org.ojalgo.concurrent
Class ConcurrentStrategy

java.lang.Object
  extended by org.ojalgo.concurrent.ConcurrentStrategy

public abstract class ConcurrentStrategy
extends Object


Field Summary
static ConcurrentStrategy BASIC
          The default strategy.
static ConcurrentStrategy DEEP
          Will use the basic strategy to determine if it should start branching.
static ConcurrentStrategy ONCE
          Will use the basic strategy to determine if it should start branching, but it will never branch more than once.
 
Constructor Summary
ConcurrentStrategy()
           
 
Method Summary
 boolean shouldBranch(int aCount, int aThreshold, IntCount availableWorkers)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASIC

public static final ConcurrentStrategy BASIC
The default strategy. Will check if the "count" is larger than the "threshold" and if there are workers available.


DEEP

public static final ConcurrentStrategy DEEP
Will use the basic strategy to determine if it should start branching. If it does start it will make use of all workers.


ONCE

public static final ConcurrentStrategy ONCE
Will use the basic strategy to determine if it should start branching, but it will never branch more than once.

Constructor Detail

ConcurrentStrategy

public ConcurrentStrategy()
Method Detail

shouldBranch

public boolean shouldBranch(int aCount,
                            int aThreshold,
                            IntCount availableWorkers)