IBM WebSphere® DataPower® XC10 Appliance
Release 2.5 Client API Specification

Package com.ibm.websphere.objectgrid.plugins

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

See:
          Description

Interface Summary
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.
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.
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.
ReplicationMapListener Deprecated. The client replicated map function is deprecated in version 8.6.
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
EvictorData.SpecialEvictorData Special value class used for representing the key not being found in the BackingMap.
LogElement.Type The Type class is used to represent a LogElement type.
 

Exception Summary
CacheEntryException This exception indicates an error occurred during a cache entry operation.
LoaderException This exception is the base exception for any exceptions encountered by a Loader.
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 WebSphere® DataPower® XC10 Appliance
Release 2.5 Client API Specification

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