public class ParallelSequentialScan extends Algorithm implements NavigationDirectory
InsertOperation
. Then, each QueryOperation
is executed on each of the buckets in parallel.Algorithm.AlgorithmConstructor
log, maximalConcurrentOperations
Constructor and Description |
---|
ParallelSequentialScan(int parallelization)
Creates a new instance of ParallelSequentialScan access structure with
MemoryStorageBucket as the storage class. |
ParallelSequentialScan(int parallelization,
java.lang.Class<? extends LocalBucket> bucketClass)
Creates a new instance of ParallelSequentialScan access structure with specific bucket class.
|
ParallelSequentialScan(int parallelization,
java.lang.Class<? extends LocalBucket> bucketClass,
java.util.Map<java.lang.String,java.lang.Object> bucketClassParams)
Creates a new instance of ParallelSequentialScan access structure with specific bucket class.
|
Modifier and Type | Method and Description |
---|---|
void |
algorithmInfo(GetAlgorithmInfoOperation operation)
Method for processing
GetAlgorithmInfoOperation . |
void |
delete(DeleteByLocatorOperation operation)
Deletes objects by locators.
|
void |
delete(DeleteOperation operation)
Deletes an object.
|
void |
destroy()
Destroy this algorithm.
|
void |
finalize()
Finalize the algorithm.
|
AsynchronousNavigationProcessor<? extends QueryOperation<?>> |
getNavigationProcessor(AbstractOperation operation)
Returns the
navigator that provides the steps
in which the given operation should be evaluated. |
void |
insert(BulkInsertOperation operation)
Inserts multiple new objects.
|
void |
insert(InsertOperation operation)
Inserts a new object.
|
void |
objectCount(GetObjectCountOperation operation)
Method for processing
GetObjectCountOperation . |
protected void |
processObjectInsert(java.util.Collection<? extends LocalAbstractObject> objects)
Processes the insertion of objects into buckets.
|
java.lang.String |
toString()
Shows the information about this algorithm.
|
afterStoreToFile, backgroundExecuteOperation, backgroundExecuteOperationIndependent, backgroundExecuteOperationWithStatistics, beforeStoreToFile, createBackgroundExecutionCallable, execute, executeMethodWithStringArguments, executeOperation, executeUsingNavDir, getAllRunningOperations, getAnnotatedConstructors, getAnnotatedConstructorsArray, getConstructorArgumentDescriptions, getConstructorDescription, getConstructorDescriptionSimple, getExecutorParamClasses, getFirstSupportedOperation, getName, getObjectClass, getObjectCount, getOperationStatistics, getOperationsThreadPool, getOperationSubClasses, getQueryAnswer, getQueryAnswer, getRunningOperationById, getRunningOperationsCount, getSupportedOperations, getSupportedOperations, methodExecute, resetOperationStatistics, restoreFromFile, restoreFromFile, setExecutedOperationsLogVerbosity, setOperationsThreadPool, setupStatsAndExecuteOperation, statisticsAfterOperation, statisticsBeforeOperation, storeToFile, terminateOperation, terminateOperation, waitBackgroundExecution
public ParallelSequentialScan(int parallelization, java.lang.Class<? extends LocalBucket> bucketClass, java.util.Map<java.lang.String,java.lang.Object> bucketClassParams) throws java.lang.IllegalArgumentException
parallelization
- the number of parallel buckets to createbucketClass
- the class of the storage bucketbucketClassParams
- additional parameters for the bucket class constructor in the name->value formjava.lang.IllegalArgumentException
- if public ParallelSequentialScan(int parallelization, java.lang.Class<? extends LocalBucket> bucketClass) throws java.lang.IllegalArgumentException
parallelization
- the number of parallel buckets to createbucketClass
- the class of the storage bucketjava.lang.IllegalArgumentException
- if public ParallelSequentialScan(int parallelization) throws java.lang.IllegalArgumentException
MemoryStorageBucket
as the storage class.parallelization
- the number of parallel buckets to createjava.lang.IllegalArgumentException
- if public void finalize() throws java.lang.Throwable
Algorithm
public void destroy() throws java.lang.Throwable
Algorithm
This implementation defaults to call Algorithm.finalize()
, but should be overridden
if the algorithm needs to differentiate between finalizing and destroying. In that case
the "super.destroy()" should not be called if finalizing is not part of destroy.
public void algorithmInfo(GetAlgorithmInfoOperation operation)
GetAlgorithmInfoOperation
.
The processing will fill the algorithm info with this
algorithm toString()
value.operation
- the operation to processpublic void objectCount(GetObjectCountOperation operation)
GetObjectCountOperation
.
The processing will fill the operation with the number of objects
stored in this algorithm.operation
- the operation to processpublic void insert(InsertOperation operation)
operation
- the insert operation which carries the object to be inserted.public void insert(BulkInsertOperation operation)
operation
- the bulk-insert operation which carries the objects to be inserted.protected void processObjectInsert(java.util.Collection<? extends LocalAbstractObject> objects) throws BucketStorageException
objects
- the collection of objects to insertBucketStorageException
- if there was an error inserting an object into internal bucketspublic void delete(DeleteOperation operation) throws BucketStorageException
operation
- the delete operation which specifies the object to be deleted.BucketStorageException
- if the low occupation limit is reached when deleting objectpublic void delete(DeleteByLocatorOperation operation) throws BucketStorageException
operation
- the delete operation which specifies the locators of objects to be deletedBucketStorageException
- if the low occupation limit is reached when deleting objectpublic AsynchronousNavigationProcessor<? extends QueryOperation<?>> getNavigationProcessor(AbstractOperation operation)
NavigationDirectory
navigator
that provides the steps
in which the given operation should be evaluated.getNavigationProcessor
in interface NavigationDirectory
operation
- the operation to get the navigator forpublic java.lang.String toString()
toString
in class java.lang.Object