ehcache

net.sf.ehcache.store
Interface CachingTier<K,V>

Type Parameters:
K -
V -
All Known Implementing Classes:
OnHeapCachingTier

public interface CachingTier<K,V>

Author:
Alex Snaps

Nested Class Summary
static interface CachingTier.Listener<K,V>
          Document me
 
Method Summary
 void addListener(CachingTier.Listener<K,V> listener)
          Document me
 void clear()
          Clears the cache...
 boolean contains(K key)
          Deprecated. 
 V get(K key, Callable<V> source, boolean updateStats)
          Document me
 int getInMemorySize()
          Deprecated. 
 long getInMemorySizeInBytes()
          Deprecated. 
 int getOffHeapSize()
          Deprecated. 
 long getOffHeapSizeInBytes()
          Deprecated. 
 long getOnDiskSizeInBytes()
          Deprecated. 
 void recalculateSize(K key)
          Deprecated. 
 V remove(K key)
          Document me
 

Method Detail

get

V get(K key,
      Callable<V> source,
      boolean updateStats)
Document me

Parameters:
key -
source -
updateStats -
Returns:

remove

V remove(K key)
Document me

Parameters:
key -

clear

void clear()
Clears the cache... todo should this notify listeners ever ?


addListener

void addListener(CachingTier.Listener<K,V> listener)
Document me

Parameters:
listener -

getInMemorySize

@Deprecated
int getInMemorySize()
Deprecated. 

Can we avoid having this somehow ?

Returns:
the count of entries held in heap

getOffHeapSize

@Deprecated
int getOffHeapSize()
Deprecated. 

Can we avoid having this somehow ?

Returns:
the count of entries held off heap

contains

@Deprecated
boolean contains(K key)
Deprecated. 

This should go away once the stats are in As the method is only there to know what tier the key is going to be fetched from

Parameters:
key -
Returns:

getInMemorySizeInBytes

@Deprecated
long getInMemorySizeInBytes()
Deprecated. 

CacheTier could keep hold of the PoolAccessors for each tier... But what about non pooled resources ?

Returns:

getOffHeapSizeInBytes

@Deprecated
long getOffHeapSizeInBytes()
Deprecated. 

CacheTier could keep hold of the PoolAccessors for each tier... But what about non pooled resources ?

Returns:

getOnDiskSizeInBytes

@Deprecated
long getOnDiskSizeInBytes()
Deprecated. 

CacheTier could keep hold of the PoolAccessors for each tier... But what about non pooled resources ?

Returns:

recalculateSize

@Deprecated
void recalculateSize(K key)
Deprecated. 

This is evil! Don't call this!

Parameters:
key -

ehcache

Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.