Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-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
`Object` | `getAssociatedKey(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 Object` | `validateKeyAssociation(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 Object getAssociatedKey(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 Object validateKeyAssociation(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:
    `RuntimeException` - if there is a circular key association chain, or if the maximum association depth has been reached

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.