IBM WebSphereTM eXtreme Scale, Release 8.5
API Specification

com.ibm.websphere.objectgrid.config
Interface BackingMapConfiguration


public interface BackingMapConfiguration

A BackingMapConfiguration object can be used to override BackingMap settings on the client side. The com.ibm.websphere.objectgrid.plugins.Evictor and the com.ibm.websphere.objectgrid.plugins.MapEventListener Plugins can be overridden. Other Evictor related settings can be tweaked.

Use the com.ibm.websphere.objectgrid.config.ObjectGridConfigFactory.createBackingMapConfiguration(String) method to create a BackingMapConfiguration

Since:
WAS XD 6.0.1.2, XC10
See Also:
Evictor, MapEventListener, Plugin, ObjectGridConfigFactory

Method Summary
 void addPlugin(Plugin plugin)
          Add a Plugin to this BackingMapConfiguration.
 String getEvictionTriggers()
          Gets the list of eviction triggers for this BackingMapConfiguration.
 String getName()
          Get the name of this BackingMapConfiguration
 int getNumberOfBuckets()
          Gets the number of buckets defined for this BackingMapConfiguration.
 List getPlugins()
          Get the Plugins that have been attached to this BackingMapConfiguration.
 int getTimeToLive()
          Gets the "time to live" for each map entry.
 TTLType getTtlEvictorType()
          Gets the "time to live" Evictor type for this BackingMapConfiguration.
 void setEvictionTriggers(String evictionTriggers)
          Sets the eviction triggers for this BackingMapConfiguration.
 void setNumberOfBuckets(int numBuckets)
          Sets the number of buckets for this BackingMapConfiguration.
 void setPlugins(List pluginList)
          Set the Plugins for this BackingMapConfiguration.
 void setTimeToLive(int seconds)
          Sets "time to live" of each BackingMap entry in seconds.
 void setTtlEvictorType(TTLType ttlEvictorType)
          Set the "time to live" Evictor type for this BackingMapConfiguration.
 

Method Detail

getName

String getName()
Get the name of this BackingMapConfiguration

Returns:
The name of this BackingMapConfiguration

addPlugin

void addPlugin(Plugin plugin)
Add a Plugin to this BackingMapConfiguration. The Plugins that can be overridden on a client-side BackingMap are com.ibm.websphere.objectgrid.plugins.Evictor and com.ibm.websphere.objectgrid.plugins.MapEventListener.

Parameters:
plugin -
See Also:
setPlugins(List)

setPlugins

void setPlugins(List pluginList)
Set the Plugins for this BackingMapConfiguration. Any Plugins that were previously attached to this BackingMapConfiguration object will be overridden.

Parameters:
pluginList - - a List of Plugins
See Also:
addPlugin(Plugin)

getPlugins

List getPlugins()
Get the Plugins that have been attached to this BackingMapConfiguration.

Returns:
a List of Plugin objects

getNumberOfBuckets

int getNumberOfBuckets()
Gets the number of buckets defined for this BackingMapConfiguration.

Returns:
the number of buckets defined

setNumberOfBuckets

void setNumberOfBuckets(int numBuckets)
Sets the number of buckets for this BackingMapConfiguration. This will be used by the BackingMap.

The BackingMap implementation uses a hash map for its implementation. If there are a lot of entries in the BackingMap then more buckets means better performance because the risk of collisions is lower as the number of buckets grows. More buckets also means more concurrency.

Parameters:
numBuckets -
See Also:
BackingMap.setNumberOfBuckets(int)

getTimeToLive

int getTimeToLive()
Gets the "time to live" for each map entry. The value is in seconds.

Returns:
the "time to live" in seconds

setTimeToLive

void setTimeToLive(int seconds)
Sets "time to live" of each BackingMap entry in seconds.

If this method is not called, the lifetime of an entry is forever (or until the application explicitly removes or invalidates the entry, or a user defined Evictor evicts the entry).

Parameters:
seconds -

getTtlEvictorType

TTLType getTtlEvictorType()
Gets the "time to live" Evictor type for this BackingMapConfiguration. If setTtlEvictorType was not called, this method will return null and the BackingMap based off this BackingMapConfiguration will use TTLType.NONE

Returns:
the "time to live" Evictor type or null if setTtlEvictorType(TTLType) was not called
See Also:
setTimeToLive(int)

setTtlEvictorType

void setTtlEvictorType(TTLType ttlEvictorType)
Set the "time to live" Evictor type for this BackingMapConfiguration. This is used to determine how expiration time of a BackingMap entry is computed.

If this method is not called, TTLType.NONE is used to indicate the map entry has no expiration time (e.g. is allowed to live until explicitly removed or invalidated by the application, or evicted by a user defined Evictor).

Parameters:
ttlEvictorType -
See Also:
BackingMap.setTtlEvictorType(TTLType)

getEvictionTriggers

String getEvictionTriggers()
Gets the list of eviction triggers for this BackingMapConfiguration.

See BackingMap for a list of valid eviction triggers.

Returns:
a semicolon separated list of eviction triggers or null if setEvictionTriggers(String) was not called
Since:
WAS XD 6.1.0.3

setEvictionTriggers

void setEvictionTriggers(String evictionTriggers)
Sets the eviction triggers for this BackingMapConfiguration. All evictors will use the eviction supplied triggers.

See BackingMap for a list of valid eviction triggers.

Parameters:
evictionTriggers - a semicolon separated list of eviction triggers
Since:
WAS XD 6.1.0.3

IBM WebSphereTM eXtreme Scale, Release 8.5
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.