Protege 3.3.1

edu.stanford.smi.protege.util.transaction
Class LosslessCacheImpl

java.lang.Object
  extended by edu.stanford.smi.protege.util.transaction.LosslessCacheImpl
All Implemented Interfaces:
Cache, LosslessCache

public class LosslessCacheImpl
extends Object
implements LosslessCache


Constructor Summary
LosslessCacheImpl()
           
 
Method Summary
 boolean isCached(Object var)
          determines if the variable var is cached in the global cache.
 Object readCache(Object var)
          If the variable var is cached then this returns the cached value.
 void removeCacheEntry(Object var)
          Invalidates the global cache for the variable var.
 void writeCache(Object var, Object result)
          Writes the value result to the global cache for the variable var.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LosslessCacheImpl

public LosslessCacheImpl()
Method Detail

isCached

public boolean isCached(Object var)
Description copied from interface: Cache
determines if the variable var is cached in the global cache. isCached(var) should always be checked before calling read(var).

Specified by:
isCached in interface Cache
Parameters:
var - a variable
Returns:
whether the variable is cached.

readCache

public Object readCache(Object var)
Description copied from interface: Cache
If the variable var is cached then this returns the cached value. It can be null.

Specified by:
readCache in interface Cache
Parameters:
var - a variable
Returns:
the value in the cache for the variable var.

writeCache

public void writeCache(Object var,
                       Object result)
Description copied from interface: Cache
Writes the value result to the global cache for the variable var.

Specified by:
writeCache in interface Cache
Parameters:
var - a variable
result - the cached value for the variable.

removeCacheEntry

public void removeCacheEntry(Object var)
Description copied from interface: Cache
Invalidates the global cache for the variable var.

Specified by:
removeCacheEntry in interface Cache
Parameters:
var - a variable

Protege 3.3.1

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2007 Stanford University.