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
Interface BackingMapManagerContext

All Superinterfaces:
  XmlConfigurable

All Known Implementing Classes:
  NullImplementation.NullBackingMapManagerContext

      public interface BackingMapManagerContext

extends XmlConfigurable

The BackingMapManager context used by the CacheService to pass information to the BackingMapManager during the service initialization. This object also allows BackingMapManager instances running on different cluster participate in a common service distribution strategy.

Since:
  Coherence 2.0
Author:
  gg 2002.09.21, 2006.06.06

Field Summary
`static int` | `DECO_CUSTOM` The decoration id for a client specific (opaque) value information.
`static int` | `DECO_EXPIRY` The decoration id for the value expiry information.
`static int` | `DECO_STORE` The decoration id for the persistent state of the decorated value.

Method Summary
`Object` | `addInternalValueDecoration(Object oValue, int nDecorId, Object oDecor)` Decorate a specified value in the internal form with a specified decoration in the "normal" Object form.
`Map` | `getBackingMap(String sCacheName)` Obtain a reference to the backing map that corresponds to the specified cache name.
`CacheService` | `getCacheService()` Return the CacheService assosiated with this context.
`ClassLoader` | `getClassLoader()` Return the ClassLoader assosiated with this context.
`XmlElement` | `getConfig()` Determine the current configuration of the assosiated BackingMapManager.
`Object` | `getInternalValueDecoration(Object oValue, int nDecorId)` Obtain a decoration from the specified value in the internal form.
`Converter` | `getKeyFromInternalConverter()` Return a converter that allows the manager (or a backing map managed thereby) to convert a key object from its internal form (as managed by the CacheService) into its "normal" (Object) form.
`int` | `getKeyPartition(Object oKey)` Determine the partition to which the specified key belongs.
`Converter` | `getKeyToInternalConverter()` Return a converter that allows the manager (or a backing map managed thereby) to convert a key object into its internal form as managed by the CacheService.
`BackingMapManager` | `getManager()` Return the BackingMapManager this object is a context for.
`Set` | `getPartitionKeys(String sCacheName, int nPartition)` Obtain a collection of keys in the internal format that belong to the specified partition for the specified backing map.
`Converter` | `getValueFromInternalConverter()` Return a converter that allows the manager (or a backing map managed thereby) to convert a value object from its internal form (as managed by the CacheService) into its "normal" (Object) form.
`Converter` | `getValueToInternalConverter()` Return a converter that allows the manager (or a backing map managed thereby) to convert a value object into its internal form as managed by the CacheService.
`boolean` | `isInternalValueDecorated(Object oValue, int nDecorId)` Check whether or not the specified value in the internal form is decorated.
`boolean` | `isKeyOwned(Object oKey)` Determines whether or not the specified key (in the internal format) is managed (i.e. controlled) by this service member.
`Object` | `removeInternalValueDecoration(Object oValue, int nDecorId)` Remove a decoration from the specified value in the internal form.
`void` | `setClassLoader(ClassLoader loader)` Assign the ClassLoader this context is assosiated with.
`void` | `setConfig(XmlElement xml)` Specify the configuration for the assosiated BackingMapManager.

Field Detail

### DECO_EXPIRY

    static final int DECO_EXPIRY

  The decoration id for the value expiry information.

### DECO_STORE

    static final int DECO_STORE

  The decoration id for the persistent state of the decorated value.

### DECO_CUSTOM

    static final int DECO_CUSTOM

  The decoration id for a client specific (opaque) value information.
  See Also:
    Constant Field Values

Method Detail

### getManager

    BackingMapManager getManager()

  Return the BackingMapManager this object is a context for.
  Returns:
    the BackingMapManager this object is a context for

### getCacheService

    CacheService getCacheService()

  Return the CacheService assosiated with this context.
  Returns:
    the CacheService assosiated with this context

### getClassLoader

    ClassLoader getClassLoader()

  Return the ClassLoader assosiated with this context.
  Returns:
    the ClassLoader assosiated with this context

### setClassLoader

    void setClassLoader(ClassLoader loader)

  Assign the ClassLoader this context is assosiated with.
  Parameters:
    `loader` - the ClassLoader assosiated with this context

### getKeyToInternalConverter

    Converter getKeyToInternalConverter()

  Return a converter that allows the manager (or a backing map managed thereby) to convert a key object into its internal form as managed by the CacheService.
  Returns:
    the object-to-internal converter

### getKeyFromInternalConverter

    Converter getKeyFromInternalConverter()

  Return a converter that allows the manager (or a backing map managed thereby) to convert a key object from its internal form (as managed by the CacheService) into its "normal" (Object) form. If a ClassLoader is available, it will be used if deserialization is involved in the conversion.
  Returns:
    the internal-to-object converter

### getValueToInternalConverter

    Converter getValueToInternalConverter()

  Return a converter that allows the manager (or a backing map managed thereby) to convert a value object into its internal form as managed by the CacheService.
  Returns:
    the object-to-internal converter

### getValueFromInternalConverter

    Converter getValueFromInternalConverter()

  Return a converter that allows the manager (or a backing map managed thereby) to convert a value object from its internal form (as managed by the CacheService) into its "normal" (Object) form. If a ClassLoader is available, it will be used if deserialization is involved in the conversion.
  Returns:
    the internal-to-object converter

### isKeyOwned

    boolean isKeyOwned(Object oKey)

  Determines whether or not the specified key (in the internal format) is managed (i.e. controlled) by this service member. In other words, is the specified key under the management of the backing map whose manager this context represents. The key does not have to actually exist for this method to evaluate it; the answer is not backing map- specific.
  Parameters:
    `oKey` - the resource key in the internal format
  Returns:
    true iff the key is managed by this service member
  Throws:
    `ClassCastException` - if the passed key is not in the internal format

### getKeyPartition

    int getKeyPartition(Object oKey)

  Determine the partition to which the specified key belongs.
  Parameters:
    `oKey` - a key in its internal format
  Returns:
    the parition ID that the specified key is assigned to
  Since:
    Coherence 3.5

### getPartitionKeys

    Set getPartitionKeys(String sCacheName,
                         int nPartition)

  Obtain a collection of keys in the internal format that belong to the specified partition for the specified backing map. The returned Set must be used in a read-only manner.
  Parameters:
    `sCacheName` - the cache name for the backing map to retrieve the set of keys for
    `nPartition` - the partition ID
  Returns:
    the Set of keys in the internal format; could be null if the backing map does not exists or the specified partition is not owned by this node
  Since:
    Coherence 3.5

### getBackingMap

    Map getBackingMap(String sCacheName)

  Obtain a reference to the backing map that corresponds to the specified cache name. The returned Map must be used in a read-only manner.
  Parameters:
    `sCacheName` - the cache name
  Returns:
    the backing map reference; null if the backing map does not exist
  Since:
    Coherence 3.5

### addInternalValueDecoration

    Object addInternalValueDecoration(Object oValue,
                                      int nDecorId,
                                      Object oDecor)

  Decorate a specified value in the internal form with a specified decoration in the "normal" Object form. It's important to understand that applying the `internal converter` to either passed-in or returned internal values will produce identical values in Object form.
  Parameters:
    `oValue` - a value in the internal form
    `nDecorId` - a decoration identifier; valid decoration identifiers are any of the DECO_* constant values
    `oDecor` - a decoration value in Object form
  Returns:
    a decorated value in the internal form

### removeInternalValueDecoration

    Object removeInternalValueDecoration(Object oValue,
                                         int nDecorId)

  Remove a decoration from the specified value in the internal form. If the specified value is not decorated, the call will have no effect. It's important to understand that applying the `internal converter` to either passed-in or returned internal values will produce identical values in Object form.
  Parameters:
    `oValue` - a decorated value in the internal form
    `nDecorId` - a decoration identifier; valid decoration identifiers are any of the DECO_* constant values
  Returns:
    an un-decorated value in the internal form

### isInternalValueDecorated

    boolean isInternalValueDecorated(Object oValue,
                                     int nDecorId)

  Check whether or not the specified value in the internal form is decorated.
  Parameters:
    `oValue` - a decorated value in the internal form
    `nDecorId` - a decoration identifier; valid decoration identifiers are any of the DECO_* constant values
  Returns:
    true if the value is decorated using the specified decoration id; false otherwise

### getInternalValueDecoration

    Object getInternalValueDecoration(Object oValue,
                                      int nDecorId)

  Obtain a decoration from the specified value in the internal form. If the specified value is decorated with the specified decoration id, a value in a "normal" Object form is returned; otherwise null.
  Parameters:
    `oValue` - a decorated value in the internal form
    `nDecorId` - a decoration identifier; valid decoration identifiers are any of the DECO_* constant values
  Returns:
    an un-decorated value in the internal form

### getConfig

    XmlElement getConfig()

  Determine the current configuration of the assosiated BackingMapManager.
  Specified by:
    `getConfig` in interface `XmlConfigurable`
  Returns:
    the XML configuration or null

### setConfig

    void setConfig(XmlElement xml)

  Specify the configuration for the assosiated BackingMapManager. The configuration content is shared between all instances of the corresponding CacheService running on different cluster nodes.
  Specified by:
    `setConfig` in interface `XmlConfigurable`
  Parameters:
    `xml` - the XML configuration
  Throws:
    `IllegalStateException` - if the object is not in a state that allows the configuration to be set; for example, if the manager has already been configured and cannot be reconfigured

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.