org.compass.needle.coherence
Class CompassCacheStore

java.lang.Object
  extended by com.tangosol.util.Base
      extended by org.compass.needle.coherence.CompassCacheStore
All Implemented Interfaces:
com.tangosol.net.cache.CacheLoader, com.tangosol.net.cache.CacheStore

public class CompassCacheStore
extends com.tangosol.util.Base
implements com.tangosol.net.cache.CacheStore

A simple Compass implementation of Coherence CacheStore implementing the store and eraze methods (no implementation for load).

Note, this implementation relies on the fact that the map key is the id of the map value.

Author:
kimchy

Nested Class Summary
 
Nested classes/interfaces inherited from class com.tangosol.util.Base
com.tangosol.util.Base.StackFrame
 
Field Summary
 
Fields inherited from class com.tangosol.util.Base
POWER_0, POWER_G, POWER_K, POWER_M, POWER_T, UNIT_D, UNIT_H, UNIT_M, UNIT_MS, UNIT_NS, UNIT_S, UNIT_US
 
Constructor Summary
CompassCacheStore(String entityName)
           
CompassCacheStore(String entityName, File configurationFile)
           
CompassCacheStore(String entityName, String resource)
           
 
Method Summary
 void erase(Object key)
           
 void eraseAll(Collection keys)
           
 Object load(Object o)
           
 Map loadAll(Collection collection)
           
 void store(Object key, Object value)
           
 void storeAll(Map entries)
           
 
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, decimalValue, dup, dup, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getErr, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, read, read, read, read, read, redirectAll, replace, setErr, setLog, setLogEcho, setOut, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, updateSafeTimeMillis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompassCacheStore

public CompassCacheStore(String entityName)

CompassCacheStore

public CompassCacheStore(String entityName,
                         String resource)

CompassCacheStore

public CompassCacheStore(String entityName,
                         File configurationFile)
Method Detail

load

public Object load(Object o)
Specified by:
load in interface com.tangosol.net.cache.CacheLoader

loadAll

public Map loadAll(Collection collection)
Specified by:
loadAll in interface com.tangosol.net.cache.CacheLoader

store

public void store(Object key,
                  Object value)
Specified by:
store in interface com.tangosol.net.cache.CacheStore

storeAll

public void storeAll(Map entries)
Specified by:
storeAll in interface com.tangosol.net.cache.CacheStore

erase

public void erase(Object key)
Specified by:
erase in interface com.tangosol.net.cache.CacheStore

eraseAll

public void eraseAll(Collection keys)
Specified by:
eraseAll in interface com.tangosol.net.cache.CacheStore


Copyright (c) 2004-2008 The Compass Project.