|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapSet
Represents a set of BackingMaps within an ObjectGrid. These maps are grouped within the MapSet for the purpose of placing them across the same set of containers. The MapSet allows for customization of many placement behaviors.
Field Summary | |
---|---|
static byte |
PLACEMENT_STRATEGY_FIXED_PARTITIONS
Represents a placement strategy where there is a fixed number of partitions that are balanced across the available set of containers. |
static byte |
PLACEMENT_STRATEGY_PER_CONTAINER
Represents a placement strategy where each container gets a fixed number of primary shards and the replicas are then balanced across the other containers. |
Method Summary | |
---|---|
void |
addMap(BackingMapConfiguration backingMapConfig)
Add a BackingMapConfiguration to this MapSet. |
void |
addShardMapping(ShardMapping shardMapping)
Add a ShardMapping to this MapSet. |
BackingMapConfiguration |
getMap(String mapName)
Get a BackinMapConfiguration that has been added to this MapSet. |
Collection |
getMaps()
Get a Collection of BackingMapConfiguration objects that have been added to this MapSet |
int |
getMaxAsyncReplicas()
Get the maximum number of asynchronous replicas for each partition in the MapSet. |
int |
getMaxSyncReplicas()
Get the maximum number of synchronous replicas for each partition in the MapSet. |
int |
getMinSyncReplicas()
Get the minimum number of synchronous replicas for each partition in the MapSet. |
String |
getName()
Get the name of this MapSet |
int |
getNumberOfPartitions()
Get the number of partitions of this MapSet. |
int |
getNumInitialContainers()
Get the initial number of containers. |
byte |
getPlacementStrategy()
Get the placement strategy employed by this MapSet. |
List |
getShardMappings()
Get a List of ShardMappings that have been added to this MapSet. |
boolean |
isAutoReplaceLostShards()
Get the replace lost shards setting. |
boolean |
isDevelopmentMode()
Get the development mode setting. |
boolean |
isReplicaReadEnabled()
Get the replica read enabled setting. |
BackingMapConfiguration |
removeMap(String mapName)
Remove a BackingMapConfiguration from this MapSet |
void |
setAutoReplaceLostShards(boolean autoReplaceLostShards)
Setting this to true instructs the placement service to automatically attempt to replace any shards that were lost as the result of container loss. |
void |
setDevelopmentMode(boolean developmentMode)
When development mode is disabled, each shard from a single partition will be placed onto a container running on a different machine. |
void |
setMaxAsyncReplicas(int maxAsyncReplicas)
Set the maximum number of asynchronous replicas for each partition in the MapSet. |
void |
setMaxSyncReplicas(int maxSyncReplicas)
Set the maximum number of synchronous replicas for each partition in the MapSet. |
void |
setMinSyncReplicas(int minSyncReplicas)
Set the minimum number of synchronous replicas for each partition in the MapSet. |
void |
setName(String mapSetName)
Set the name of this MapSet |
void |
setNumberOfPartitions(int numberOfPartitions)
Set the number of partitions for this MapSet. |
void |
setNumInitialContainers(int numInitialContainers)
Set the number of containers that must be available to host this MapSet before initial placement will occur. |
void |
setPlacementStrategy(byte strategy)
Set the placement strategy that this MapSet should employ. |
void |
setReplicaReadEnabled(boolean replicaReadEnabled)
Enable or disable reading data from replicas. |
Field Detail |
---|
static final byte PLACEMENT_STRATEGY_FIXED_PARTITIONS
static final byte PLACEMENT_STRATEGY_PER_CONTAINER
Method Detail |
---|
void setName(String mapSetName)
mapSetName
- the name of the MapSetString getName()
void addMap(BackingMapConfiguration backingMapConfig)
backingMapConfig
- the BackingMapConfiguration to add.
ObjectGridRuntimeException
- if the BackingMapConfiguration is not found in the containing ObjectGridDeployment object.BackingMapConfiguration removeMap(String mapName)
mapName
- name of the map to remove
BackingMapConfiguration getMap(String mapName)
mapName
- - name of the BackingMapConfiguration to retrieve.
Collection getMaps()
int getMaxAsyncReplicas()
setMaxAsyncReplicas(int)
void setMaxAsyncReplicas(int maxAsyncReplicas)
maxAsyncReplicas
- the maximum number of asynchronous replicas for each partitiongetMaxAsyncReplicas()
int getMaxSyncReplicas()
setMaxSyncReplicas(int)
void setMaxSyncReplicas(int maxSyncReplicas)
maxSyncReplicas
- the maximum number of synchronous replicas for each partition.int getMinSyncReplicas()
setMinSyncReplicas(int)
void setMinSyncReplicas(int minSyncReplicas)
Placement of this MapSet will not occur until there are containers available to support each partition's primary as well as the number of minimum synchronous replicas specified.
minSyncReplicas
- - the minimum number of synchronous replicas for each partitionint getNumberOfPartitions()
setNumberOfPartitions(int)
void setNumberOfPartitions(int numberOfPartitions)
numberOfPartitions
- - each map within this MapSet will be divided into this number of partitionsbyte getPlacementStrategy()
PLACEMENT_STRATEGY_FIXED_PARTITIONS
,
PLACEMENT_STRATEGY_PER_CONTAINER
void setPlacementStrategy(byte strategy)
strategy
- The strategy that this MapSet should employ for placement.PLACEMENT_STRATEGY_FIXED_PARTITIONS
,
PLACEMENT_STRATEGY_PER_CONTAINER
void setReplicaReadEnabled(boolean replicaReadEnabled)
replicaReadEnabled
- set to true to enable reading from replica.
Set to false to force all reads to occur on the primary.boolean isReplicaReadEnabled()
setReplicaReadEnabled(boolean)
void setNumInitialContainers(int numInitialContainers)
This number must be greater than or equal to 1. The numInitialContainers is ignored if placement strategy is set to PLACEMENT_STRATEGY_PER_CONTAINER.
numInitialContainers
- the number of containers (1 or more) that must be available.setMinSyncReplicas(int)
,
setPlacementStrategy(byte)
int getNumInitialContainers()
setNumInitialContainers(int)
void setAutoReplaceLostShards(boolean autoReplaceLostShards)
Setting this to false will cause lost shard to remain unplaced.
By default, lost shards will be automatically replaced.
autoReplaceLostShards
- set to false to prevent lost shards from automatically being replacedboolean isAutoReplaceLostShards()
setAutoReplaceLostShards(boolean)
void setDevelopmentMode(boolean developmentMode)
developmentMode
- boolean isDevelopmentMode()
setDevelopmentMode(boolean)
List getShardMappings()
addShardMapping(ShardMapping)
void addShardMapping(ShardMapping shardMapping)
ShardMappings are not required. If ShardMappings are used, there must be one for each shard in the partition. One for the primary shard, a ShardMapping for each synchronous replica up to the number of maximum synchronous replicas, and a ShardMapping for each asynchronous replica up to the number of maximum asynchronous replicas.
The order in which the ShardMappings are added is significant. Within each replica type (synchronous, asynchronous), the ShardMapping's position in the List, relative to the same ShardType, will determine which shard the ShardMapping applies to. For example, the first ShardMapping added for a synchronous replica shard type will determine the placement behavior of the first synchronous replica.
shardMapping
- the ShardMapping to add.
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |