|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.kernel.impl.nioneo.store.CommonAbstractStore
org.neo4j.kernel.impl.nioneo.store.AbstractStore
public abstract class AbstractStore
An abstract representation of a store. A store is a file that contains
records. Each record has a fixed size (getRecordSize()) so
the position for a record can be calculated by
id * getRecordSize().
A store has an IdGenerator managing the records that are free or in
use.
| Field Summary |
|---|
| Fields inherited from class org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore |
|---|
ALL_STORES_VERSION, logger, storageFileName, UNKNOWN_VERSION |
| Constructor Summary | |
|---|---|
AbstractStore(String fileName,
Map<?,?> config,
IdType idType)
|
|
| Method Summary | |
|---|---|
protected static void |
createEmptyStore(String fileName,
String typeAndVersionDescriptor,
IdGeneratorFactory idGeneratorFactory)
Creates a new empty store. |
protected long |
figureOutHighestIdInUse()
|
abstract List<WindowPoolStats> |
getAllWindowPoolStats()
|
protected int |
getEffectiveRecordSize()
|
abstract int |
getRecordSize()
Returns the fixed size of each record in this store. |
protected boolean |
isRecordInUse(ByteBuffer buffer)
|
protected void |
readAndVerifyBlockSize()
|
protected void |
rebuildIdGenerator()
Rebuilds the IdGenerator by looping through all records and
checking if record in use or not. |
void |
setHighId(int id)
Sets the high id of IdGenerator. |
protected void |
verifyFileSizeAndTruncate()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractStore(String fileName,
Map<?,?> config,
IdType idType)
| Method Detail |
|---|
public abstract int getRecordSize()
protected long figureOutHighestIdInUse()
figureOutHighestIdInUse in class CommonAbstractStore
protected static void createEmptyStore(String fileName,
String typeAndVersionDescriptor,
IdGeneratorFactory idGeneratorFactory)
This method will create a empty store containing the descriptor returned
by the getTypeDescriptor(). The id generator
used by this store will also be created
fileName - The file name of the store that will be createdtypeAndVersionDescriptor - The type and version descriptor that identifies this store
IOException - If fileName is null or if file existsprotected int getEffectiveRecordSize()
getEffectiveRecordSize in class CommonAbstractStore
protected void readAndVerifyBlockSize()
throws IOException
readAndVerifyBlockSize in class CommonAbstractStoreIOException
protected void verifyFileSizeAndTruncate()
throws IOException
verifyFileSizeAndTruncate in class CommonAbstractStoreIOExceptionpublic void setHighId(int id)
IdGenerator.
id - The high idprotected boolean isRecordInUse(ByteBuffer buffer)
protected void rebuildIdGenerator()
IdGenerator by looping through all records and
checking if record in use or not.
rebuildIdGenerator in class CommonAbstractStoreIOException - if unable to rebuild the id generatorpublic abstract List<WindowPoolStats> getAllWindowPoolStats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||