org.codehaus.activespace.cache.impl
Class TransactionalCacheCommand

java.lang.Object
  extended byorg.codehaus.activespace.cache.impl.CacheCommand
      extended byorg.codehaus.activespace.cache.impl.TransactionalCacheCommand
All Implemented Interfaces:
Serializable

public class TransactionalCacheCommand
extends CacheCommand

TransactionalCacheCommand is the default implementation of a CacheCommand which can include adding new items, updating items and removing items.

Version:
1.7
Author:
James Strachan
See Also:
Serialized Form

Constructor Summary
TransactionalCacheCommand(String name, Map changes, Map removalKeys, boolean clear, String originator)
           
 
Method Summary
protected  void applyChanges(javax.cache.Cache cache)
           
protected  void checkForConcurrencyFailure(javax.cache.Cache cache)
           
 String getOriginator()
          Returns the orignator (the thread which initiated the command)
 Map getReadVersions()
           
 void run(TransactionalCacheManager cacheManager)
           
 void runOnCache(ThreadCache threadCache)
           
 void runOnCache(TransactionalCache transactionCache)
           
 void setOriginator(String originator)
           
 void setReadVersions(Map readVersions)
           
 void updateBackingCache(javax.cache.Cache cache)
           
protected  boolean versionsCompatible(Object updateVersion, Object currentVersion)
          Returns true if the given version of the entry is compatible with this change
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionalCacheCommand

public TransactionalCacheCommand(String name,
                                 Map changes,
                                 Map removalKeys,
                                 boolean clear,
                                 String originator)
Method Detail

getOriginator

public String getOriginator()
Description copied from class: CacheCommand
Returns the orignator (the thread which initiated the command)

Specified by:
getOriginator in class CacheCommand

setOriginator

public void setOriginator(String originator)

run

public void run(TransactionalCacheManager cacheManager)
Specified by:
run in class CacheCommand

runOnCache

public void runOnCache(TransactionalCache transactionCache)

runOnCache

public void runOnCache(ThreadCache threadCache)

updateBackingCache

public void updateBackingCache(javax.cache.Cache cache)

getReadVersions

public Map getReadVersions()

setReadVersions

public void setReadVersions(Map readVersions)

checkForConcurrencyFailure

protected void checkForConcurrencyFailure(javax.cache.Cache cache)

versionsCompatible

protected boolean versionsCompatible(Object updateVersion,
                                     Object currentVersion)
Returns true if the given version of the entry is compatible with this change


applyChanges

protected void applyChanges(javax.cache.Cache cache)


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