org.das2.dataset
Class LimitSizeBytesDataSetCache

java.lang.Object
  extended by org.das2.dataset.AbstractDataSetCache
      extended by org.das2.dataset.LimitSizeBytesDataSetCache
All Implemented Interfaces:
DataSetCache

public class LimitSizeBytesDataSetCache
extends AbstractDataSetCache

DataCache that attempts to limit the amount of memory it consumes, by using DataSetUtil.guessSizeBytes(DataSet)


Nested Class Summary
 
Nested classes/interfaces inherited from class org.das2.dataset.AbstractDataSetCache
AbstractDataSetCache.Entry
 
Field Summary
 
Fields inherited from class org.das2.dataset.AbstractDataSetCache
hits, misses
 
Constructor Summary
LimitSizeBytesDataSetCache(long totalSizeLimitBytes)
          Creates a new instance of LimitSizeBytesDataSetCache
 
Method Summary
 java.lang.String getDisplayString()
           
 AbstractDataSetCache.Entry[] getEntries()
           
 AbstractDataSetCache.Entry getEntries(int i)
           
 Datum getHitRate()
           
 Datum getTotalSize()
           
 Datum getTotalSizeLimit()
           
 void reset()
          reset the internal state of the cache
 void setTotalSizeLimit(Datum d)
           
 void store(DataSetDescriptor dsd, CacheTag cacheTag, DataSet data)
           
 
Methods inherited from class org.das2.dataset.AbstractDataSetCache
cacheValue, coalese, haveStored, isResetCache, retrieve, setResetCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitSizeBytesDataSetCache

public LimitSizeBytesDataSetCache(long totalSizeLimitBytes)
Creates a new instance of LimitSizeBytesDataSetCache

Method Detail

reset

public void reset()
Description copied from class: AbstractDataSetCache
reset the internal state of the cache

Specified by:
reset in interface DataSetCache
Specified by:
reset in class AbstractDataSetCache

store

public void store(DataSetDescriptor dsd,
                  CacheTag cacheTag,
                  DataSet data)
Specified by:
store in interface DataSetCache
Specified by:
store in class AbstractDataSetCache

getEntries

public AbstractDataSetCache.Entry[] getEntries()

getEntries

public AbstractDataSetCache.Entry getEntries(int i)

getTotalSize

public Datum getTotalSize()

getTotalSizeLimit

public Datum getTotalSizeLimit()

setTotalSizeLimit

public void setTotalSizeLimit(Datum d)

getHitRate

public Datum getHitRate()

getDisplayString

public java.lang.String getDisplayString()