public class ClusterTopology extends Object implements Externalizable
Modifier and Type | Field and Description |
---|---|
static int |
CHUNKS_COUNT |
Constructor and Description |
---|
ClusterTopology() |
ClusterTopology(int numOfPartitions)
used from unit tests
|
Modifier and Type | Method and Description |
---|---|
ClusterTopology |
copy() |
int |
getGeneration() |
int |
getNumberOfBackups() |
int |
getNumberOfInstances() |
Set<Integer> |
getPartitionChunks(int partition) |
int |
getPartitionId(int routingValue) |
int |
getPartitionId(long routingValue) |
Map<Integer,Set<Integer>> |
getPartitionsToChunksMap() |
String |
getSchema() |
void |
readExternal(ObjectInput in) |
ClusterTopology |
setGeneration(int generation) |
ClusterTopology |
setNumOfBackups(int numOfBackups) |
ClusterTopology |
setNumOfInstances(int numOfInstances) |
ClusterTopology |
setPartitionsToChunksMap(Map<Integer,Set<Integer>> partitionsToChunksMap) |
ClusterTopology |
setSchema(String schema) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public ClusterTopology()
public ClusterTopology(int numOfPartitions)
numOfPartitions
- public ClusterTopology setGeneration(int generation)
public ClusterTopology setSchema(String schema)
public ClusterTopology setNumOfInstances(int numOfInstances)
public ClusterTopology setNumOfBackups(int numOfBackups)
public ClusterTopology setPartitionsToChunksMap(Map<Integer,Set<Integer>> partitionsToChunksMap)
public int getGeneration()
public int getNumberOfInstances()
public int getNumberOfBackups()
public String getSchema()
public int getPartitionId(int routingValue)
public int getPartitionId(long routingValue)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public ClusterTopology copy()
Copyright © GigaSpaces.