public final class ReferenceContainerArray<ReferenceType extends Reference>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ReferenceContainerArray.BLOBReducer |
static interface |
ReferenceContainerArray.ContainerReducer<ReferenceType extends Reference> |
class |
ReferenceContainerArray.ReferenceContainerIterator |
class |
ReferenceContainerArray.ReferenceCountIterator |
Modifier and Type | Field and Description |
---|---|
private ArrayStack |
array |
private ReferenceFactory<ReferenceType> |
factory |
private static long |
METHOD_MAXRUNTIME |
Constructor and Description |
---|
ReferenceContainerArray(java.io.File heapLocation,
java.lang.String prefix,
ReferenceFactory<ReferenceType> factory,
ByteOrder termOrder,
int termSize)
open a index container array based on BLOB dumps.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
close() |
int |
count(byte[] termHash) |
void |
delete(byte[] termHash)
delete a indexContainer from the heap cache.
|
int |
entries() |
ReferenceContainer<ReferenceType> |
get(byte[] termHash)
get a indexContainer from a heap
|
boolean |
has(byte[] termHash)
test if a given key is in the heap
this works with heaps in write- and read-mode
|
CloneableIterator<byte[]> |
keys(boolean up,
boolean rotating) |
void |
mountBLOBFile(java.io.File location) |
java.io.File |
newContainerBLOBFile() |
ByteOrder |
ordering() |
int |
reduce(byte[] termHash,
ReferenceContainerArray.ContainerReducer<ReferenceType> reducer) |
CloneableIterator<ReferenceContainer<ReferenceType>> |
referenceContainerIterator(byte[] startWordHash,
boolean rot,
boolean excludePrivate)
return an iterator object that creates top-level-clones of the indexContainers
in the cache, so that manipulations of the iterated objects do not change
objects in the cache.
|
CloneableIterator<Rating<byte[]>> |
referenceCountIterator(byte[] startWordHash,
boolean rot,
boolean excludePrivate)
return an iterator object that counts the number of references in indexContainers
the startWordHash may be null to iterate all from the beginning
|
Row |
rowdef() |
boolean |
shrinkAnySmallFiles(IODispatcher merger,
long targetFileSize) |
boolean |
shrinkBestSmallFiles(IODispatcher merger,
long targetFileSize) |
boolean |
shrinkOldFiles(IODispatcher merger) |
boolean |
shrinkUpToMaxSizeFiles(IODispatcher merger,
long maxFileSize) |
int[] |
sizes() |
private static final long METHOD_MAXRUNTIME
private final ReferenceFactory<ReferenceType extends Reference> factory
private final ArrayStack array
public ReferenceContainerArray(java.io.File heapLocation, java.lang.String prefix, ReferenceFactory<ReferenceType> factory, ByteOrder termOrder, int termSize) throws java.io.IOException
payloadrow
- the row definition for the BLOB data structurelog
- java.io.IOException
public void close()
public void clear() throws java.io.IOException
java.io.IOException
public int[] sizes()
public ByteOrder ordering()
public java.io.File newContainerBLOBFile()
public void mountBLOBFile(java.io.File location) throws java.io.IOException
java.io.IOException
public Row rowdef()
public CloneableIterator<ReferenceContainer<ReferenceType>> referenceContainerIterator(byte[] startWordHash, boolean rot, boolean excludePrivate)
java.io.IOException
public CloneableIterator<Rating<byte[]>> referenceCountIterator(byte[] startWordHash, boolean rot, boolean excludePrivate)
java.io.IOException
public boolean has(byte[] termHash)
key
- java.io.IOException
public ReferenceContainer<ReferenceType> get(byte[] termHash) throws java.io.IOException, SpaceExceededException
key
- java.io.IOException
SpaceExceededException
public int count(byte[] termHash) throws java.io.IOException
java.io.IOException
public void delete(byte[] termHash) throws java.io.IOException
wordHash
- java.io.IOException
public int reduce(byte[] termHash, ReferenceContainerArray.ContainerReducer<ReferenceType> reducer) throws java.io.IOException, SpaceExceededException
java.io.IOException
SpaceExceededException
public CloneableIterator<byte[]> keys(boolean up, boolean rotating) throws java.io.IOException
java.io.IOException
public int entries()
public boolean shrinkBestSmallFiles(IODispatcher merger, long targetFileSize)
public boolean shrinkAnySmallFiles(IODispatcher merger, long targetFileSize)
public boolean shrinkUpToMaxSizeFiles(IODispatcher merger, long maxFileSize)
public boolean shrinkOldFiles(IODispatcher merger)