Class CacheEntry
- java.lang.Object
-
- com.biglybt.core.diskmanager.cache.impl.CacheEntry
-
public class CacheEntry extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected DirectByteBuffer
buffer
protected int
buffer_limit
protected int
buffer_pos
protected static int
CT_DATA_WRITE
protected static int
CT_READ_AHEAD
protected boolean
dirty
protected int
entry_type
protected CacheFileWithCache
file
protected long
last_used
protected long
offset
protected int
size
protected int
usage_count
-
Constructor Summary
Constructors Modifier Constructor Description protected
CacheEntry(int _entry_type, CacheFileWithCache _file, DirectByteBuffer _buffer, long _offset, int _size)
(package private)
CacheEntry(long offset)
Constructs a dummy cache entry used to search in a Set
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectByteBuffer
getBuffer()
CacheFileWithCache
getFile()
long
getFilePosition()
protected long
getLastUsed()
int
getLength()
protected java.lang.String
getString()
protected int
getType()
protected int
getUsageCount()
boolean
isDirty()
protected void
resetBufferPosition()
void
setClean()
protected void
used()
-
-
-
Field Detail
-
CT_DATA_WRITE
protected static final int CT_DATA_WRITE
- See Also:
- Constant Field Values
-
CT_READ_AHEAD
protected static final int CT_READ_AHEAD
- See Also:
- Constant Field Values
-
file
protected CacheFileWithCache file
-
buffer
protected DirectByteBuffer buffer
-
offset
protected final long offset
-
size
protected int size
-
buffer_pos
protected int buffer_pos
-
buffer_limit
protected int buffer_limit
-
dirty
protected boolean dirty
-
last_used
protected long last_used
-
entry_type
protected int entry_type
-
usage_count
protected int usage_count
-
-
Constructor Detail
-
CacheEntry
CacheEntry(long offset)
Constructs a dummy cache entry used to search in a Set- Parameters:
offset
-
-
CacheEntry
protected CacheEntry(int _entry_type, CacheFileWithCache _file, DirectByteBuffer _buffer, long _offset, int _size)
-
-
Method Detail
-
getFile
public CacheFileWithCache getFile()
-
getFilePosition
public long getFilePosition()
-
getLength
public int getLength()
-
getBuffer
public DirectByteBuffer getBuffer()
-
isDirty
public boolean isDirty()
-
setClean
public void setClean()
-
resetBufferPosition
protected void resetBufferPosition()
-
used
protected void used()
-
getLastUsed
protected long getLastUsed()
-
getUsageCount
protected int getUsageCount()
-
getType
protected int getType()
-
getString
protected java.lang.String getString()
-
-