Class PartitionedBucketSelectionStrategy
- java.lang.Object
-
- com.arcadedb.database.bucketselectionstrategy.ThreadBucketSelectionStrategy
-
- com.arcadedb.database.bucketselectionstrategy.RoundRobinBucketSelectionStrategy
-
- com.arcadedb.database.bucketselectionstrategy.PartitionedBucketSelectionStrategy
-
- All Implemented Interfaces:
BucketSelectionStrategy
public class PartitionedBucketSelectionStrategy extends RoundRobinBucketSelectionStrategy
Select the bucket using a partition algorithm computed as the hashed value of the properties values. This allows to predetermine in which bucket is contained a key(s) and therefore a document. There are some limitations on using this implementation: (1) field identified as partition key cannot be modified. (This could be solved in the future by removing and recreating the document in a different bucket. If the record is part of a graph, then the edges will be updated accordingly.)- Author:
- Luca Garulli
-
-
Field Summary
-
Fields inherited from class com.arcadedb.database.bucketselectionstrategy.ThreadBucketSelectionStrategy
total
-
-
Constructor Summary
Constructors Constructor Description PartitionedBucketSelectionStrategy(String[] propertyNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBucketIdByKeys(Object[] keyValues, boolean async)
int
getBucketIdByRecord(Document record, boolean async)
String
getName()
void
setType(DocumentType type)
-
Methods inherited from class com.arcadedb.database.bucketselectionstrategy.ThreadBucketSelectionStrategy
toString
-
-
-
-
Constructor Detail
-
PartitionedBucketSelectionStrategy
public PartitionedBucketSelectionStrategy(String[] propertyNames)
-
-
Method Detail
-
setType
public void setType(DocumentType type)
- Specified by:
setType
in interfaceBucketSelectionStrategy
- Overrides:
setType
in classRoundRobinBucketSelectionStrategy
-
getBucketIdByRecord
public int getBucketIdByRecord(Document record, boolean async)
- Specified by:
getBucketIdByRecord
in interfaceBucketSelectionStrategy
- Overrides:
getBucketIdByRecord
in classRoundRobinBucketSelectionStrategy
-
getBucketIdByKeys
public int getBucketIdByKeys(Object[] keyValues, boolean async)
- Specified by:
getBucketIdByKeys
in interfaceBucketSelectionStrategy
- Overrides:
getBucketIdByKeys
in classThreadBucketSelectionStrategy
-
getName
public String getName()
- Specified by:
getName
in interfaceBucketSelectionStrategy
- Overrides:
getName
in classRoundRobinBucketSelectionStrategy
-
-