public class RetainedSizeCache extends Object implements IIndexReader
IIndexReader.IOne2LongIndex, IIndexReader.IOne2ManyIndex, IIndexReader.IOne2ManyObjectsIndex, IIndexReader.IOne2OneIndex, IIndexReader.IOne2SizeIndex
Constructor and Description |
---|
RetainedSizeCache(File f)
File is expected to exist, and is read in the new format.
|
RetainedSizeCache(XSnapshotInfo snapshotInfo)
Reads file i2sv2.index in new format,
or file i2s.index in the old format,
or creates an empty map.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the backing file.
|
void |
delete()
Delete the backing file.
|
long |
get(int key) |
void |
put(int key,
long value) |
int |
size()
Size of the index
|
void |
unload()
Clear the caches.
|
public RetainedSizeCache(File f)
f
- public RetainedSizeCache(XSnapshotInfo snapshotInfo)
snapshotInfo
- public long get(int key)
public void put(int key, long value)
public void close()
IIndexReader
close
in interface IIndexReader
public int size()
IIndexReader
size
in interface IIndexReader
public void unload() throws IOException
IIndexReader
unload
in interface IIndexReader
IOException
public void delete()
IIndexReader
delete
in interface IIndexReader