Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.data.cache
Interface IPersistentObjectCache<K>

All Known Implementing Classes:
SoftCache

public interface IPersistentObjectCache<K>


Method Summary
 void clear()
           
 java.lang.Object get(K key)
          retrieve a previously inserted object
 void purge()
          Expire and remove all Objects (without removing the SoftReferences, to avoid ConcurrentModificationExceptions)
 void put(K key, java.lang.Object object, int timeToCacheInSeconds)
          Insert an Object that will stay until it is manually removed, or memory gets low, or at most for ICacheable#getCacheTime seconds
 void remove(K key)
           
 void reset()
          completely delete cache
 void stat()
          write statistics to log
 

Method Detail

put

void put(K key,
         java.lang.Object object,
         int timeToCacheInSeconds)
Insert an Object that will stay until it is manually removed, or memory gets low, or at most for ICacheable#getCacheTime seconds


get

java.lang.Object get(K key)
retrieve a previously inserted object

Returns:
the object or null, if the object was expired or removed bei the garbage collector.

remove

void remove(K key)

clear

void clear()

stat

void stat()
write statistics to log


purge

void purge()
Expire and remove all Objects (without removing the SoftReferences, to avoid ConcurrentModificationExceptions)


reset

void reset()
completely delete cache


Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis