org.teiid.cache.jboss
Class TupleBatchCacheLoader

java.lang.Object
  extended by org.jboss.cache.loader.AbstractCacheLoader
      extended by org.teiid.cache.jboss.TupleBatchCacheLoader
All Implemented Interfaces:
org.jboss.cache.Lifecycle, org.jboss.cache.loader.CacheLoader

public class TupleBatchCacheLoader
extends org.jboss.cache.loader.AbstractCacheLoader


Nested Class Summary
static class ClusteredTupleBatchCacheLoader.ResponseValidityFilter
           
 
Field Summary
 
Fields inherited from class org.jboss.cache.loader.AbstractCacheLoader
buddyFqnTransformer, cache, regionManager, transactions
 
Constructor Summary
TupleBatchCacheLoader()
           
 
Method Summary
 void commit(java.lang.Object tx)
          Does nothing.
 boolean exists(org.jboss.cache.Fqn fqn)
           
 java.util.Map<java.lang.Object,java.lang.Object> get(org.jboss.cache.Fqn fqn)
           
protected  java.util.Map get0(org.jboss.cache.Fqn name)
           
 java.util.Set<?> getChildrenNames(org.jboss.cache.Fqn fqn)
           
 org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig getConfig()
           
protected  boolean isCacheReady()
          A test to check whether the cache is in its started state.
 void loadEntireState(java.io.ObjectOutputStream os)
           
 void loadState(org.jboss.cache.Fqn subtree, java.io.ObjectOutputStream os)
           
 void prepare(java.lang.Object tx, java.util.List modifications, boolean one_phase)
          Does nothing.
 void put(org.jboss.cache.Fqn name, java.util.Map attributes)
          Does nothing; replication handles put.
 java.lang.Object put(org.jboss.cache.Fqn fqn, java.lang.Object key, java.lang.Object value)
           
 void put(java.util.List<org.jboss.cache.Modification> modifications)
          Does nothing; replication handles put.
 void remove(org.jboss.cache.Fqn fqn)
          Does nothing; replication handles removal.
 java.lang.Object remove(org.jboss.cache.Fqn fqn, java.lang.Object key)
          Fetches the remove value, does not remove.
 void removeData(org.jboss.cache.Fqn fqn)
          Does nothing; replication handles removal.
 void rollback(java.lang.Object tx)
          Does nothing.
 void setCommandsFactory(org.jboss.cache.commands.CommandsFactory commandsFactory)
           
 void setConfig(org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig config)
          Sets the configuration.
 void setRegionManager(org.jboss.cache.RegionManager manager)
           
 void start()
           
 void storeEntireState(java.io.ObjectInputStream is)
           
 void storeState(org.jboss.cache.Fqn subtree, java.io.ObjectInputStream is)
           
 
Methods inherited from class org.jboss.cache.loader.AbstractCacheLoader
create, destroy, doMarshall, doUnmarshall, getMarshaller, getNodeDataList, loadStateHelper, move, put, regionAwareMarshall, regionAwareUnmarshall, setCache, stop, storeStateHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleBatchCacheLoader

public TupleBatchCacheLoader()
Method Detail

exists

public boolean exists(org.jboss.cache.Fqn fqn)
               throws java.lang.Exception
Specified by:
exists in interface org.jboss.cache.loader.CacheLoader
Throws:
java.lang.Exception

get

public java.util.Map<java.lang.Object,java.lang.Object> get(org.jboss.cache.Fqn fqn)
                                                     throws java.lang.Exception
Specified by:
get in interface org.jboss.cache.loader.CacheLoader
Throws:
java.lang.Exception

getChildrenNames

public java.util.Set<?> getChildrenNames(org.jboss.cache.Fqn fqn)
                                  throws java.lang.Exception
Specified by:
getChildrenNames in interface org.jboss.cache.loader.CacheLoader
Throws:
java.lang.Exception

getConfig

public org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig getConfig()
Specified by:
getConfig in interface org.jboss.cache.loader.CacheLoader

put

public java.lang.Object put(org.jboss.cache.Fqn fqn,
                            java.lang.Object key,
                            java.lang.Object value)
                     throws java.lang.Exception
Specified by:
put in interface org.jboss.cache.loader.CacheLoader
Throws:
java.lang.Exception

remove

public void remove(org.jboss.cache.Fqn fqn)
            throws java.lang.Exception
Does nothing; replication handles removal.

Specified by:
remove in interface org.jboss.cache.loader.CacheLoader
Throws:
java.lang.Exception

remove

public java.lang.Object remove(org.jboss.cache.Fqn fqn,
                               java.lang.Object key)
                        throws java.lang.Exception
Fetches the remove value, does not remove. Replication handles removal.

Specified by:
remove in interface org.jboss.cache.loader.CacheLoader
Throws:
java.lang.Exception

removeData

public void removeData(org.jboss.cache.Fqn fqn)
                throws java.lang.Exception
Does nothing; replication handles removal.

Specified by:
removeData in interface org.jboss.cache.loader.CacheLoader
Throws:
java.lang.Exception

setConfig

public void setConfig(org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig config)
Sets the configuration. A property timeout is used as the timeout value.

Specified by:
setConfig in interface org.jboss.cache.loader.CacheLoader

start

public void start()
Specified by:
start in interface org.jboss.cache.Lifecycle
Overrides:
start in class org.jboss.cache.loader.AbstractCacheLoader

isCacheReady

protected boolean isCacheReady()
A test to check whether the cache is in its started state. If not, calls should not be made as the channel may not have properly started, blocks due to state transfers may be in progress, etc.

Returns:
true if the cache is in its STARTED state.

setCommandsFactory

public void setCommandsFactory(org.jboss.cache.commands.CommandsFactory commandsFactory)

get0

protected java.util.Map get0(org.jboss.cache.Fqn name)
                      throws java.lang.Exception
Throws:
java.lang.Exception

put

public void put(org.jboss.cache.Fqn name,
                java.util.Map attributes)
         throws java.lang.Exception
Does nothing; replication handles put.

Throws:
java.lang.Exception

put

public void put(java.util.List<org.jboss.cache.Modification> modifications)
         throws java.lang.Exception
Does nothing; replication handles put.

Specified by:
put in interface org.jboss.cache.loader.CacheLoader
Overrides:
put in class org.jboss.cache.loader.AbstractCacheLoader
Throws:
java.lang.Exception

prepare

public void prepare(java.lang.Object tx,
                    java.util.List modifications,
                    boolean one_phase)
             throws java.lang.Exception
Does nothing.

Specified by:
prepare in interface org.jboss.cache.loader.CacheLoader
Overrides:
prepare in class org.jboss.cache.loader.AbstractCacheLoader
Throws:
java.lang.Exception

commit

public void commit(java.lang.Object tx)
            throws java.lang.Exception
Does nothing.

Specified by:
commit in interface org.jboss.cache.loader.CacheLoader
Overrides:
commit in class org.jboss.cache.loader.AbstractCacheLoader
Throws:
java.lang.Exception

rollback

public void rollback(java.lang.Object tx)
Does nothing.

Specified by:
rollback in interface org.jboss.cache.loader.CacheLoader
Overrides:
rollback in class org.jboss.cache.loader.AbstractCacheLoader

loadEntireState

public void loadEntireState(java.io.ObjectOutputStream os)
                     throws java.lang.Exception
Specified by:
loadEntireState in interface org.jboss.cache.loader.CacheLoader
Overrides:
loadEntireState in class org.jboss.cache.loader.AbstractCacheLoader
Throws:
java.lang.Exception

loadState

public void loadState(org.jboss.cache.Fqn subtree,
                      java.io.ObjectOutputStream os)
               throws java.lang.Exception
Specified by:
loadState in interface org.jboss.cache.loader.CacheLoader
Overrides:
loadState in class org.jboss.cache.loader.AbstractCacheLoader
Throws:
java.lang.Exception

storeEntireState

public void storeEntireState(java.io.ObjectInputStream is)
                      throws java.lang.Exception
Specified by:
storeEntireState in interface org.jboss.cache.loader.CacheLoader
Overrides:
storeEntireState in class org.jboss.cache.loader.AbstractCacheLoader
Throws:
java.lang.Exception

storeState

public void storeState(org.jboss.cache.Fqn subtree,
                       java.io.ObjectInputStream is)
                throws java.lang.Exception
Specified by:
storeState in interface org.jboss.cache.loader.CacheLoader
Overrides:
storeState in class org.jboss.cache.loader.AbstractCacheLoader
Throws:
java.lang.Exception

setRegionManager

public void setRegionManager(org.jboss.cache.RegionManager manager)
Specified by:
setRegionManager in interface org.jboss.cache.loader.CacheLoader
Overrides:
setRegionManager in class org.jboss.cache.loader.AbstractCacheLoader


Copyright © 2010. All Rights Reserved.