IBM WebSphere Extended Deployment (XD)TM, Release 6.1
ObjectGrid API Specification

Package com.ibm.websphere.objectgrid.plugins

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

See:
          Description

Interface Summary
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.
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.
ObjectTransformer An ObjectTransformer can be used to serialize map entries that are not defined to be Serializable.
OptimisticCallback An object implementing this interface is used to provide optimistic comparison operations for the values of a Map.
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 This listener is a listener for the client-side map in replication mode.
RollbackEvictor This interface is optionally implemented by an Evictor plugin.
TransactionCallback Calling methods on a Session will send corresponding events to the TransactionCallback.
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.
 

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.
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 WebSphere Extended Deployment (XD)TM, Release 6.1
ObjectGrid API Specification

© Copyright International Business Machines Corp 2005-2007. All rights reserved.