|
||||||||||
| 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
org.neo4j.kernel.impl.nioneo.store.RelationshipTypeStore
public class RelationshipTypeStore
Implementation of the relationship type store. Uses a dynamic store to store relationship type names.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.neo4j.kernel.impl.nioneo.store.RecordStore |
|---|
RecordStore.Processor |
| Field Summary | |
|---|---|
static String |
TYPE_DESCRIPTOR
|
| Fields inherited from class org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore |
|---|
ALL_STORES_VERSION, logger, storageFileName, UNKNOWN_VERSION |
| Fields inherited from interface org.neo4j.kernel.impl.nioneo.store.RecordStore |
|---|
IN_USE |
| Constructor Summary | |
|---|---|
RelationshipTypeStore(String fileName,
Map<?,?> config,
IdType idType)
|
|
| Method Summary | |
|---|---|
void |
accept(RecordStore.Processor processor,
RelationshipTypeRecord record)
|
Collection<DynamicRecord> |
allocateTypeNameRecords(int startBlock,
byte[] src)
|
protected void |
closeStorage()
This method should close/release all resources that the implementation of this store has allocated and is called just before the close()
method returns. |
static void |
createStore(String fileName,
Map<?,?> config)
Creates a new relationship type store contained in fileName
If filename is null or the file already exists an
IOException is thrown. |
void |
flushAll()
|
RelationshipTypeRecord |
forceGetRaw(long id)
|
RelationshipTypeRecord |
forceGetRecord(long id)
|
void |
forceUpdateRecord(RelationshipTypeRecord record)
|
void |
freeBlockId(int id)
|
List<WindowPoolStats> |
getAllWindowPoolStats()
|
RelationshipTypeRecord |
getRecord(int id)
|
RelationshipTypeRecord |
getRecord(long id)
|
int |
getRecordHeaderSize()
|
int |
getRecordSize()
Returns the fixed size of each record in this store. |
RelationshipTypeData |
getRelationshipType(int id)
|
RelationshipTypeData |
getRelationshipType(int id,
boolean recovered)
|
RelationshipTypeData[] |
getRelationshipTypes()
|
String |
getStringFor(RelationshipTypeRecord relTypeRecord)
|
String |
getTypeDescriptor()
Returns the type and version that identifies this store. |
protected void |
initStorage()
Called from the constructor after the end header has been checked. |
void |
logIdUsage(StringLogger logger)
|
void |
makeStoreOk()
If store is not ok a call to this method will rebuild the IdGenerator used by this store and if successful mark it as
ok. |
long |
nextBlockId()
|
protected void |
rebuildIdGenerator()
Rebuilds the IdGenerator by looping through all records and
checking if record in use or not. |
void |
rebuildIdGenerators()
|
protected void |
setRecovered()
|
protected void |
unsetRecovered()
|
void |
updateIdGenerators()
|
void |
updateRecord(RelationshipTypeRecord record)
|
void |
updateRecord(RelationshipTypeRecord record,
boolean recovered)
|
| Methods inherited from class org.neo4j.kernel.impl.nioneo.store.AbstractStore |
|---|
createEmptyStore, figureOutHighestIdInUse, getEffectiveRecordSize, isRecordInUse, readAndVerifyBlockSize, setHighId, verifyFileSizeAndTruncate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.neo4j.kernel.impl.nioneo.store.Store |
|---|
getHighestPossibleIdInUse, getNumberOfIdsInUse, getWindowPoolStats, nextId |
| Methods inherited from interface org.neo4j.kernel.impl.nioneo.store.RecordStore |
|---|
close, getHighId |
| Field Detail |
|---|
public static final String TYPE_DESCRIPTOR
| Constructor Detail |
|---|
public RelationshipTypeStore(String fileName,
Map<?,?> config,
IdType idType)
| Method Detail |
|---|
public void accept(RecordStore.Processor processor,
RelationshipTypeRecord record)
accept in interface RecordStore<RelationshipTypeRecord>protected void setRecovered()
setRecovered in class CommonAbstractStoreprotected void unsetRecovered()
unsetRecovered in class CommonAbstractStoreprotected void initStorage()
CommonAbstractStorepersistence windows and other resources that
are needed by overriding this implementation.
This default implementation does nothing.
initStorage in class CommonAbstractStoreprotected void closeStorage()
CommonAbstractStoreclose()
method returns. Override this method to clean up stuff created in
CommonAbstractStore.initStorage() method.
This default implementation does nothing.
closeStorage in class CommonAbstractStorepublic void flushAll()
flushAll in class CommonAbstractStorepublic String getTypeDescriptor()
CommonAbstractStore
getTypeDescriptor in interface StoregetTypeDescriptor in class CommonAbstractStorepublic int getRecordSize()
AbstractStore
getRecordSize in interface RecordStore<RelationshipTypeRecord>getRecordSize in class AbstractStorepublic int getRecordHeaderSize()
getRecordHeaderSize in interface RecordStore<RelationshipTypeRecord>
public static void createStore(String fileName,
Map<?,?> config)
fileName
If filename is null or the file already exists an
IOException is thrown.
fileName - File name of the new relationship type store
IOException - If unable to create store or name null
public Collection<DynamicRecord> allocateTypeNameRecords(int startBlock,
byte[] src)
public void updateRecord(RelationshipTypeRecord record,
boolean recovered)
public void updateRecord(RelationshipTypeRecord record)
updateRecord in interface RecordStore<RelationshipTypeRecord>public void forceUpdateRecord(RelationshipTypeRecord record)
forceUpdateRecord in interface RecordStore<RelationshipTypeRecord>public RelationshipTypeRecord getRecord(int id)
public RelationshipTypeRecord getRecord(long id)
getRecord in interface RecordStore<RelationshipTypeRecord>public RelationshipTypeRecord forceGetRecord(long id)
forceGetRecord in interface RecordStore<RelationshipTypeRecord>public RelationshipTypeRecord forceGetRaw(long id)
forceGetRaw in interface RecordStore<RelationshipTypeRecord>
public RelationshipTypeData getRelationshipType(int id,
boolean recovered)
public RelationshipTypeData getRelationshipType(int id)
public RelationshipTypeData[] getRelationshipTypes()
public long nextBlockId()
public void freeBlockId(int id)
protected void rebuildIdGenerator()
AbstractStoreIdGenerator by looping through all records and
checking if record in use or not.
rebuildIdGenerator in class AbstractStorepublic String getStringFor(RelationshipTypeRecord relTypeRecord)
public void makeStoreOk()
CommonAbstractStoreIdGenerator used by this store and if successful mark it as
ok.
makeStoreOk in class CommonAbstractStorepublic void rebuildIdGenerators()
rebuildIdGenerators in class CommonAbstractStorepublic void updateIdGenerators()
public List<WindowPoolStats> getAllWindowPoolStats()
getAllWindowPoolStats in class AbstractStorepublic void logIdUsage(StringLogger logger)
logIdUsage in interface Store
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||