IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

Package com.ibm.websphere.objectgrid.plugins

These are the interfaces for adding plugins to the Grid core framework.

See:
          Description

Interface Summary
BackingMapLifecycleListener Listener for BackingMap life cycle events.
BackingMapLifecycleListener.LifecycleEvent The LifecycleEvent describes the situation that caused a change in the lifecycle of the BackingMap.
BackingMapPlugin BackingMap plug-ins implement this interface to be invoked when the plug-in should be initialized and destroyed.
BeanFactory Implement this interface to allow bean factories like Spring or Google guice to be integrated.
CacheEntry This interface represents a cache entry in an ObjectGrid map.
Destroyable Java bean plug-ins can implement this interface to allow destroying the plug-in after it's state has been set.
EventListener The EventListener interface is the base interface used to indicate that an implementing class can accept certain ObjectGrid or BackingMap events.
EvictionEventCallback An instance of EvictionEventCallback is passed into the Evictor at initialization time.
Evictor Data contained in a BackingMap are evicted when the map is full.
EvictorData This interface is optionally used by an implementator of the Evictor interface.
ExceptionMapper The ExceptionMapper interface allows users to plug in specific exception mapping functionality.
Initializable Java bean plug-ins can implement this interface to allow initializing the plug-in after it's state has been set.
Loader Data in a map sometimes are backed up by a "database".
LogElement LogElements are the individual entries within a LogSequence.
LogSequence LogSequence is the ordered list of changes performed against a given map for a given transaction.
LogSequenceFilter This interface can be used to filter a LogSequence.
MapEventListener This callback interface is implemented by the application when it wants to receive events about a Map such as the eviction of a map entry.
ObjectGridEventGroup This is a set of single method interfaces for fine grained events delivered for an ObjectGrid.
ObjectGridEventGroup.ShardEvents These events are fired when a shard is made a primary shard and when the shard is demoted from a primary.
ObjectGridEventGroup.ShardLifecycle These events are fired when an ObjectGrid shard is initialized and destroyed.
ObjectGridEventGroup.TransactionEvents These events are called every single transaction.
ObjectGridEventListener This interface is used to create an implementation of an event listener for an ObjectGrid.
ObjectGridLifecycleListener Listener for ObjectGrid life cycle events.
ObjectGridLifecycleListener.LifecycleEvent The LifecycleEvent describes the situation that caused a change in the lifecycle of the ObjectGrid.
ObjectGridPlugin ObjectGrid plug-ins implement this interface to be invoked when the plug-in should be initialized and destroyed.
ObjectTransformer Deprecated. This plug-in is deprecated in version 7.1.1.
OptimisticCallback Deprecated. This plug-in is deprecated in version 7.1.1.
PartitionableKey This interface is used to identify keys that want to use their own partitioning algorithm.
ReplicaPreloadController A Map Loader should also implement this interface in the following circumstances.
ReplicationMapListener Deprecated. The client replicated map function is deprecated in version 8.6.
RetryableLoader This interface represents a loader which is capable of handling a retry (redo) update from ObjectGrid runtime.
RollbackEvictor This interface is optionally implemented by an Evictor plugin.
TransactionCallback Calling methods on a Session will send corresponding events to the TransactionCallback.
TransactionCallback.BeforeCommit The BeforeCommit optional mix-in interface for the TransactionCallback plug-in interface allows plug-ins to be notified at the beginning of a Session.commit().
TransactionCallback.BeforeCommit.TransactionContext The TransactionContext identifies various information that's available to the beforeCommit() method.
ValueProxyInfo This interface can be used by value objects to inform a BackingMap or Loader which attribute(s) have been dirtied.
 

Class Summary
DistributionMode This class is used to define the "distribution" mode when the serialize() method on the LogSequenceTransformer interface is used.
EvictorData.SpecialEvictorData Special value class used for representing the key not being found in the BackingMap.
Loader.SpecialValue Special value class used for representing the key not being found in the Loader.
LogElement.Type The Type class is used to represent a LogElement type.
LogSequenceTransformer This class is used to serialize and de-serialize LogSequences.
ReplicaPreloadController.Status This class is used as an enumerator for the Map preload status.
 

Enum Summary
BackingMapLifecycleListener.State The state of a BackingMap's life cycle.
ObjectGridLifecycleListener.State The state of a ObjectGrid's life cycle.
 

Exception Summary
CacheEntryException This exception indicates an error occurred during a cache entry operation.
LifecycleFailedException Thrown when there is a fatal problem invoking a BackingMapLifecycleListener or ObjectGridLifecycleListener.
LoaderException This exception is the base exception for any exceptions encountered by a Loader.
OptimisticCollisionException This exception is thrown when optimistic locking strategy is used and more than one update transaction collides on the same map entry of a ObjectGrid instance.
TransactionCallbackException This exception is thrown when a method call to TransactionCallback fails.
 

Package com.ibm.websphere.objectgrid.plugins Description

These are the interfaces for adding plugins to the Grid core framework.

Overview

These plugins can be added into ObjectGrid in several ways such as xml configuration, programmatically adding, or using annotation.

Annotation based callbacks

ObjectGrid when running on Java 5 will start to use an annotated method callback system. This means that objects can be registered as callbacks or listeners. The methods on the object must be annotated as to be invoked for a certain event. Unannotated methods are not invoked. The name of the method is unimportant. The method arguments and return type must be the same as expected for the callback method.

Why?

Usually, callbacks are specified using an interface. This works well but results in a possible performance loss as all methods on the interface will be invoked by the ObjectGrid even though the application is only interested in a single event. This wastes precious resources. Another issue is when we need to add a new event. Adding a new method to an existing interface breaks back wards compatibility. We can make a new interface extending the old one with the new methods but this is also undesirable as soon there are many interfaces in the hierarchy as new events are added. The annotation system allows the application to only mark methods to be called avoiding the first problem and if new event types are added they have no impact on existing callback objects. Newer applications can add a method and annotate it with the new event annotation to receive the event.


IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

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