org.codehaus.activespace.cache
Class ClusteredCacheManager

java.lang.Object
  extended byjavax.cache.CacheManager
      extended byorg.codehaus.activespace.cache.TransactionalCacheManager
          extended byorg.codehaus.activespace.cache.ClusteredCacheManager

public class ClusteredCacheManager
extends TransactionalCacheManager

Version:
$Revision: 1.9 $

Field Summary
 
Fields inherited from class javax.cache.CacheManager
instance
 
Constructor Summary
ClusteredCacheManager(Space space)
           
 
Method Summary
 void commit()
          Performs a thread local commit of all pending transactions on all the caches
protected  TransactionalCache createTransactionalCache(javax.cache.Cache backingCache, String name)
           
protected  Object getLockForOriginator(String originator)
           
protected  boolean hasLockFor(String originator)
           
protected  void notifyOriginator(String originator)
           
protected  void onSpaceEvent(SpaceEvent event)
           
 void stop()
          Shuts down this class, freeing any resources used up (such as open files or sockets).
protected  void waitUntilTransactionApplied(Object lock, String originator)
          Wait around up to some timeout period until the local transaction has been distributed around the cluster and applied locally to the backing cache
 
Methods inherited from class org.codehaus.activespace.cache.TransactionalCacheManager
createBackingCache, createCommitCommand, createTransactionalCache, getBackingCache, getCache, getEnvironment, getTransactionalCache, getTransactionalCaches, getTransactionRegistration, handleCommitException, registerCache, resetLocalChanges, rollback, setEnvironment, setTransactionRegistration
 
Methods inherited from class javax.cache.CacheManager
getCacheFactory, getInstance, registerCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusteredCacheManager

public ClusteredCacheManager(Space space)
Method Detail

stop

public void stop()
          throws Exception
Description copied from class: TransactionalCacheManager
Shuts down this class, freeing any resources used up (such as open files or sockets). One this method has been called this class should not be used again.

Overrides:
stop in class TransactionalCacheManager
Throws:
Exception

commit

public void commit()
Performs a thread local commit of all pending transactions on all the caches

Overrides:
commit in class TransactionalCacheManager

onSpaceEvent

protected void onSpaceEvent(SpaceEvent event)

notifyOriginator

protected void notifyOriginator(String originator)

getLockForOriginator

protected Object getLockForOriginator(String originator)

waitUntilTransactionApplied

protected void waitUntilTransactionApplied(Object lock,
                                           String originator)
Wait around up to some timeout period until the local transaction has been distributed around the cluster and applied locally to the backing cache


hasLockFor

protected boolean hasLockFor(String originator)

createTransactionalCache

protected TransactionalCache createTransactionalCache(javax.cache.Cache backingCache,
                                                      String name)
Overrides:
createTransactionalCache in class TransactionalCacheManager


Copyright © 2004 Protique, Ltd.. All Rights Reserved.