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
Class DefaultKeyAssociator

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.net.partition.DefaultKeyAssociator

All Implemented Interfaces:
  KeyAssociator

    public class DefaultKeyAssociator

extends Base
implements KeyAssociator

A DefaultKeyAssociator provides key associations on behalf of keys that implement the `KeyAssociation` interface.

Since:
  Coherence 3.0
Author:
  gg 2005.05.19

Field Summary
`protected PartitionedService` | `m_service` The PartitionedService that this DefaultKeyAssociator is bound to.

Constructor Summary
`DefaultKeyAssociator()` Default constructor.

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.
`protected java.lang.Object` | `validateKeyAssociation(java.lang.Object oKey)` Check to see if the given key contains a circular association.

Field Detail

### m_service

    protected PartitionedService m_service

  The PartitionedService that this DefaultKeyAssociator is bound to.

Constructor Detail

### DefaultKeyAssociator

    public DefaultKeyAssociator()

  Default constructor.

Method Detail

### init

    public void init(PartitionedService service)

  Initialize the KeyAssociator and bind it to a PartitionedService.

  Specified by:
    `init` in interface `KeyAssociator`
  Parameters:
    `service` - the PartitionedService that this associator is being bound to

### getAssociatedKey

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

  Determine the key object to which the specified key object is associated. The association is calculated only for keys that implement the `KeyAssociation` interface. Circular associations are not allowed.

  Specified by:
    `getAssociatedKey` in interface `KeyAssociator`
  Returns:
    the key object that is associated with the specified key, or null if the specified key has no association

### validateKeyAssociation

    protected java.lang.Object validateKeyAssociation(java.lang.Object oKey)

  Check to see if the given key contains a circular association.

  Parameters:
    `oKey` - the key to check
  Returns:
    the key object that is associated with the specified key, or null if the specified key has no association
  Throws:
    `java.lang.RuntimeException` - if there is a circular key association chain, or if the maximum association depth has been reached

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.