Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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(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.
`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, 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

### 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(java.lang.Object oKey)

  Determine the primary owner of the specified key, as determined by the combination of the KeyPartitioningStrategy and the PartitionAssignmentStrategy. It's possible that during partition re-distribution (e.g. as a result of a failover) this method will return null, indicating that the partition ownership is currently undetermined.

  Parameters:
    `oKey` - a key in its Object form
  Returns:
    the cluster Member that is currently the owner for the specified key or null if the ownership is currently undetermined
  See Also:
    `PartitionAssignmentStrategy.getPartitionOwner(int)`

### getOwnedPartitions

    PartitionSet getOwnedPartitions(Member member)

  Determine the PartitionSet that is currently owned by a cluster Member. If the specified member does not run this clustered service, null is returned.

  Note: the returned PartitionSet represents a "snapshot" of the ownership information at a time of the call and may change at any moment.

  Parameters:
    `member` - the cluster Member
  Returns:
    the PartitionSet that the cluster Member currently owns
  Since:
    Coherence 3.4

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.