public abstract class ClusteringStrategy
extends java.lang.Object
ClusteringStrategy as a part of VfsConfig is specified on VirtualFileSystem
creation. It defines the way the VirtualFileSystem splits contents of files on clusters.
Each cluster is a single key/value pair in a Store of Environment used to create the
VirtualFileSystem. The greater file is the more clusters are required to save its contents.
LINEAR clustering strategy says the VirtualFileSystem to create clusters of the same size.
QUADRATIC clustering strategy says the VirtualFileSystem to create new cluster greater than the previous one on a specific constant. This strategy is default.
EXPONENTIAL clustering strategy says the VirtualFileSystem to create new cluster of size which is multiple of the size of the previous cluster.
| Modifier and Type | Class and Description |
|---|---|
static class |
ClusteringStrategy.ExponentialClusteringStrategy
Exponential strategy: each cluster size is multiple of size of previous one (phi times more).
|
static class |
ClusteringStrategy.LinearClusteringStrategy
Linear strategy: all clusters are of the same size.
|
static class |
ClusteringStrategy.QuadraticClusteringStrategy
Quadratic strategy: each cluster size is greater than size of previous one on a constant (first cluster size).
|
| Modifier and Type | Field and Description |
|---|---|
static ClusteringStrategy |
EXPONENTIAL |
static ClusteringStrategy |
LINEAR |
static ClusteringStrategy |
QUADRATIC |
| Constructor and Description |
|---|
ClusteringStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
adjustClusterSize(int nextClusterSize) |
abstract int |
getFirstClusterSize() |
int |
getMaxClusterSize() |
boolean |
isLinear() |
void |
setMaxClusterSize(int maxClusterSize) |
public static final ClusteringStrategy LINEAR
public static final ClusteringStrategy QUADRATIC
public static final ClusteringStrategy EXPONENTIAL