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.partition
Interface KeyAssociator

All Known Implementing Classes:
  DefaultKeyAssociator

    public interface KeyAssociator

A KeyAssociator provides key associations on behalf of a set of keys. The information provided by a KeyAssociator will be used to place all associated keys into the same partition. Custom KeyAssociator implementations should not allow circular associations.

See `KeyAssociatedFilter` for an example of a distributed query that takes advantage of a custom KeyAssociator implementation to dramatically optimize its performance.

Since:
  Coherence 3.0

Method Summary
`java.lang.Object` | `getAssociatedKey(java.lang.Object oKey)` Determine the key object to which the specified key object is associated.
`void` | `init(PartitionedService service)` Initialize the KeyAssociator and bind it to a PartitionedService.

Method Detail

### init

    void init(PartitionedService service)

  Initialize the KeyAssociator and bind it to a PartitionedService.

  Parameters:
    `service` - the PartitionedService that this associator is being bound to

### getAssociatedKey

    java.lang.Object getAssociatedKey(java.lang.Object oKey)

  Determine the key object to which the specified key object is associated.

  Note: Circular associations are not permitted.

  Returns:
    the key object that is associated with the specified key, or null if the specified key has no association

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.