I - input symbol classO - output classpublic class ParallelOracle<I,O> extends Object implements MembershipOracle<I,O>
MembershipOracle.DFAMembershipOracle<I>, MembershipOracle.MealyMembershipOracle<I,O>| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MIN_BATCH_SIZE |
| Constructor and Description |
|---|
ParallelOracle(List<? extends MembershipOracle<I,O>> oracles)
Constructor for using (potentially) separate oracles for each worker thread,
with a default minimum batch size.
|
ParallelOracle(List<? extends MembershipOracle<I,O>> oracles,
int minBatchSize)
Constructor for using (potentially) separate oracles for each worker thread.
|
ParallelOracle(MembershipOracle<I,O> sharedOracle,
int numInstances)
Constructor for using one shared oracle for all worker threads,
with the default minimum batch size.
|
ParallelOracle(MembershipOracle<I,O> sharedOracle,
int numInstances,
int minBatchSize)
Constructor for using one shared oracle for all worker threads,
with a custom minimum batch size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
processQueries(Collection<? extends Query<I,O>> queries)
Processes the specified collection of queries.
|
void |
start()
Starts all worker threads.
|
void |
stop()
Stop all worker threads.
|
public static int DEFAULT_MIN_BATCH_SIZE
public ParallelOracle(List<? extends MembershipOracle<I,O>> oracles)
oracles - the oracles to use for answering the queries. The cardinality of this
list coincides with the number of threads created.public ParallelOracle(List<? extends MembershipOracle<I,O>> oracles, int minBatchSize)
oracles - the oracles to use for answering the queries. The cardinality of this
list coincides with the number of threads created.minBatchSize - the minimum batch sizepublic ParallelOracle(MembershipOracle<I,O> sharedOracle, int numInstances)
sharedOracle - the shared oraclenumInstances - the number of threads to createpublic ParallelOracle(MembershipOracle<I,O> sharedOracle, int numInstances, int minBatchSize)
sharedOracle - the shared oraclenumInstances - the number of threads to createminBatchSize - the minimum batch sizepublic void start()
public void processQueries(Collection<? extends Query<I,O>> queries)
MembershipOracleprocessQueries in interface MembershipOracle<I,O>queries - the queries to processDefaultQuery.getOutput()public void stop()
processQueries(Collection)
will result in an IllegalStateException until the next call to start()
is made.Copyright © 2014. All Rights Reserved.