CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.net
Interface PartitionedService

All Superinterfaces:
ClassLoaderAware, Controllable, Service
All Known Subinterfaces:
DistributedCacheService

public interface PartitionedService
extends Service

A PartitionedService is aware of a mapping of keys to partitions and of partitions to cluster members.

Since:
Coherence 3.0

Method Summary
 int getBackupCount()
          Determine the configured redundancy count that this service has been configured to maintain.
 KeyAssociator getKeyAssociator()
          Determine the key associatior that this service has been configured to use.
 Member getKeyOwner(Object oKey)
          Determine the primary owner of the specified key, as determined by the combination of the KeyPartitioningStrategy and the PartitionAssignmentStrategy.
 KeyPartitioningStrategy getKeyPartitioningStrategy()
          Determine the strategy for key partitioning that this service has been configured to use.
 PartitionAssignmentStrategy getPartitionAssignmentStrategy()
          Determine the strategy for assigning partitions to cluster members that this service has been configured to use.
 int getPartitionCount()
          Determine the number of partitions that the service has been configured to "break up" the conceptual "key set" into.
 
Methods inherited from interface com.tangosol.net.Service
addMemberListener, getCluster, getInfo, getUserContext, removeMemberListener, setUserContext
 
Methods inherited from interface com.tangosol.util.Controllable
configure, getContextClassLoader, isRunning, setContextClassLoader, shutdown, start, stop
 

Method Detail

getPartitionCount

int getPartitionCount()
Determine the number of partitions that the service has been configured to "break up" the conceptual "key set" into.

The value of this property is in the range [1..n] where n is an arbitrarily large integer value that does not exceed Integer.MAX_VALUE.

Returns:
the number of separate partitions into which this service partitions the set of potential keys

getBackupCount

int getBackupCount()
Determine the configured redundancy count that this service has been configured to maintain. A redundancy count of zero implies that the service will not maintain backup copies of information for failover purposes, while a redundancy count greater than zero indicates that the service must attempt to synchronously maintain that number of backup copies of the data under the management of the service in order to provide seamless (and lossless) failover of data and processing.

The value of this property is in the range [0..n] where n is an arbitrarily large integer value that does not exceed Integer.MAX_VALUE.

Returns:
the configured redundancy count for this service

getKeyAssociator

KeyAssociator getKeyAssociator()
Determine the key associatior that this service has been configured to use. Information provided by this KeyAssociator will be used to place all associated keys into the same partition.

Returns:
the KeyAssociator for this service

getKeyPartitioningStrategy

KeyPartitioningStrategy getKeyPartitioningStrategy()
Determine the strategy for key partitioning that this service has been configured to use.

Returns:
the KeyPartitioningStrategy for this service

getPartitionAssignmentStrategy

PartitionAssignmentStrategy getPartitionAssignmentStrategy()
Determine the strategy for assigning partitions to cluster members that this service has been configured to use.

Returns:
the PartitionAssignmentStrategy for this service

getKeyOwner

Member getKeyOwner(Object oKey)
Determine the primary owner of the specified key, as determined by the combination of the KeyPartitioningStrategy and the PartitionAssignmentStrategy.

Parameters:
oKey - a key in its Object form
Returns:
the cluster Member that currently is the owner for the specified key

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation