com.imagero.uio.buffer
Class MemoryAccessManager
java.lang.Object
com.imagero.uio.buffer.MemoryAccessManager
- public abstract class MemoryAccessManager
- extends java.lang.Object
MemoryAccessManager.
Implements 5 possible strategies to free memory:
- DROP_NEVER - Buffer(s) are never dropped
- DROP_IMMEDIATELY - only 1 Buffer is held in memory
- DROP_RANDOM - if buffer count exceeds maxBufferCount then randomly choosed Buffer is dropped
- DROP_LRU - if buffer count exceeds maxBufferCount then Least Recently Used Buffer is dropped
- DROP_FIFO - if buffer count exceeds maxBufferCount then Least Recently Added Buffer is dropped
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DROP_NEVER
public static final int DROP_NEVER
- See Also:
- Constant Field Values
DROP_IMMEDIATELY
public static final int DROP_IMMEDIATELY
- See Also:
- Constant Field Values
DROP_RANDOM
public static final int DROP_RANDOM
- See Also:
- Constant Field Values
DROP_LRU
public static final int DROP_LRU
- See Also:
- Constant Field Values
DROP_FIFO
public static final int DROP_FIFO
- See Also:
- Constant Field Values
MemoryAccessManager
public MemoryAccessManager()
getDefaultStrategy
public static int getDefaultStrategy()
setDefaultStrategy
public static void setDefaultStrategy(int defaultStrategy)
createMemoryAccessManager
public static MemoryAccessManager createMemoryAccessManager()
createMemoryAccessManager
public static MemoryAccessManager createMemoryAccessManager(int strategy)
get
public abstract Buffer get(java.lang.Integer key)
put
public abstract void put(java.lang.Integer key,
Buffer b)
add
public void add(Buffer b)
get
public Buffer get(int i)
getCount
public int getCount()
getBufferLength
public int getBufferLength(int i)
getBufferLength
public int getBufferLength(java.lang.Integer key)
drop
public Buffer drop(java.lang.Integer key)
getMaxBufferCount
public int getMaxBufferCount()
setMaxBufferCount
public void setMaxBufferCount(int maxBufferCount)
clear
public void clear()
isDirty
public boolean isDirty(int index)
isDirty
public boolean isDirty(java.lang.Integer key)
keys
public java.util.Enumeration keys()