org.jboss.ha.framework.server.spi
Interface HAPartitionCacheHandler


public interface HAPartitionCacheHandler

Handles basic lifecycle operations on HAPartition's cache without exposing the cache and introducing a dependency on JBoss Cache. Purpose is to allow an HAPartition to obtain information about a cache's channel in order to allow it to create a channel with the same configuration. That is important when some services use both a cache and HAPartition and thus want compatible channels for both the cache and the partition.

Assumption is that an implementation of this interface would work with an org.jboss.cache.CacheManager as a source of its cache, but an implemenation could work otherwise.

Author:
Brian Stansberry

Method Summary
 void acquireCache()
          Instructs this handler to acquire a reference to the cache.
 org.jgroups.ChannelFactory getCacheChannelFactory()
          Gets the ChannelFactory from which the cache obtains its Channel.
 String getCacheConfigName()
          Gets the name of the cache's configuration.
 String getChannelStackName()
          Gets the name of cache's JGroups protocol stack configuration.
 void releaseCache()
          Instructs this handler to release any reference to the cache.
 void startCache()
          Instructs this handler to start the cache previously obtained via acquireCache().
 

Method Detail

acquireCache

void acquireCache()
                  throws Exception
Instructs this handler to acquire a reference to the cache.

Throws:
Exception

startCache

void startCache()
                throws Exception
Instructs this handler to start the cache previously obtained via acquireCache().

Throws:
Exception

releaseCache

void releaseCache()
                  throws Exception
Instructs this handler to release any reference to the cache.

Throws:
Exception

getCacheConfigName

String getCacheConfigName()
Gets the name of the cache's configuration.

Returns:
the name of the cache configuration

getChannelStackName

String getChannelStackName()
Gets the name of cache's JGroups protocol stack configuration.

Returns:
the name of the protocol stack configuration

getCacheChannelFactory

org.jgroups.ChannelFactory getCacheChannelFactory()
Gets the ChannelFactory from which the cache obtains its Channel.

Returns:
the channel factory.


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.