|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PartitionedService
A PartitionedService is aware of a mapping of keys to partitions and of partitions to cluster members.
Nested Class Summary | |
---|---|
static interface |
PartitionedService.PartitionedAction PartitionedAction represents a type of action taken by a PartitionedService. |
Method Summary | |
---|---|
void |
addPartitionListener(PartitionListener listener) Add a PartitionListener to this service. |
int |
getBackupCount() Determine the configured redundancy count that this service has been configured to maintain. |
Member |
getBackupOwner(int nPartition, int nBackup) Determine the backup owner of the specified partition. |
KeyAssociator |
getKeyAssociator() Determine the key associatior that this service has been configured to use. |
Member |
getKeyOwner(java.lang.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. |
PartitionSet |
getOwnedPartitions(Member member) Determine the PartitionSet that is currently owned by a cluster Member. |
java.util.Set |
getOwnershipEnabledMembers() Return a Set of Member objects, one for each Member that has registered this PartitionedService and is partition ownership-enabled. |
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. |
Member |
getPartitionOwner(int nPartition) Determine the primary owner of the specified partition. |
void |
removePartitionListener(PartitionListener listener) Remove a PartitionListener from this service. |
Methods inherited from interface com.tangosol.net.Service |
---|
addMemberListener, getCluster, getInfo, getSerializer, getUserContext, removeMemberListener, setUserContext |
Methods inherited from interface com.tangosol.util.Service |
---|
addServiceListener, removeServiceListener |
Methods inherited from interface com.tangosol.util.Controllable |
---|
configure, isRunning, shutdown, start, stop |
Methods inherited from interface com.tangosol.io.ClassLoaderAware |
---|
getContextClassLoader, setContextClassLoader |
Method Detail |
---|
int getPartitionCount()
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.
int getBackupCount()
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.
KeyAssociator getKeyAssociator()
KeyPartitioningStrategy getKeyPartitioningStrategy()
PartitionAssignmentStrategy getPartitionAssignmentStrategy()
Member getKeyOwner(java.lang.Object oKey)
oKey
- a key in its Object formMember getPartitionOwner(int nPartition)
nPartition
- a partition IDjava.lang.IllegalArgumentException
- if the partition number is negative or greater than the partition count
for this partitioned serviceMember getBackupOwner(int nPartition, int nBackup)
nPartition
- a partition IDnBackup
- the backup number (one-based)java.lang.IllegalArgumentException
- if the partition number is negative or greater than the partition count
or if the backup number is non-positive or greater than the backup count
for this partitioned servicePartitionSet getOwnedPartitions(Member member)
Note: the returned PartitionSet represents a "snapshot" of the ownership information at a time of the call and may change at any moment.
member
- the cluster Memberjava.util.Set getOwnershipEnabledMembers()
void addPartitionListener(PartitionListener listener)
listener
- the listener to addvoid removePartitionListener(PartitionListener listener)
listener
- the listener to remove
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |