org.neo4j.kernel.impl.nioneo.store
Class RelationshipStore

java.lang.Object
  extended by org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore
      extended by org.neo4j.kernel.impl.nioneo.store.AbstractStore
          extended by org.neo4j.kernel.impl.nioneo.store.RelationshipStore
All Implemented Interfaces:
RecordStore<RelationshipRecord>, Store

public class RelationshipStore
extends AbstractStore
implements Store, RecordStore<RelationshipRecord>

Implementation of the relationship store.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.neo4j.kernel.impl.nioneo.store.RecordStore
RecordStore.Processor
 
Field Summary
static int RECORD_SIZE
           
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
RelationshipStore(String fileName, Map<?,?> config)
          See AbstractStore#AbstractStore(String, Map)
 
Method Summary
 void accept(RecordStore.Processor processor, RelationshipRecord record)
           
 void close()
          Closes this store.
static void createStore(String fileName, IdGeneratorFactory idGeneratorFactory)
          Creates a new relationship store contained in fileName If filename is null or the file already exists an IOException is thrown.
 RelationshipRecord forceGetRaw(long id)
           
 RelationshipRecord forceGetRecord(long id)
           
 void forceUpdateRecord(RelationshipRecord record)
           
 List<WindowPoolStats> getAllWindowPoolStats()
           
 RelationshipRecord getChainRecord(long relId)
           
 RelationshipRecord getLightRel(long id)
           
 RelationshipRecord getRecord(long id)
           
 int getRecordHeaderSize()
           
 int getRecordSize()
          Returns the fixed size of each record in this store.
 String getTypeDescriptor()
          Returns the type and version that identifies this store.
 void logIdUsage(StringLogger logger)
           
 void updateRecord(RelationshipRecord record)
           
 void updateRecord(RelationshipRecord record, boolean recovered)
           
 
Methods inherited from class org.neo4j.kernel.impl.nioneo.store.AbstractStore
createEmptyStore, figureOutHighestIdInUse, getEffectiveRecordSize, isRecordInUse, readAndVerifyBlockSize, rebuildIdGenerator, setHighId, verifyFileSizeAndTruncate
 
Methods inherited from class org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore
acquireWindow, buildTypeDescriptorAndVersion, calculateMappedMemory, checkStorage, checkVersion, closeIdGenerator, closeStorage, createIdGenerator, flushAll, freeId, getConfig, getFileChannel, getFileSystem, getHighestPossibleIdInUse, getHighId, getIdType, getIfMemoryMapped, getNumberOfIdsInUse, getStorageFileName, getStoreDir, getStoreOk, getTypeAndVersionDescriptor, getWindowPoolStats, initStorage, isInRecoveryMode, loadStorage, logVersions, longFromIntAndMod, makeStoreOk, nextId, openIdGenerator, openIdGenerator, openReadOnlyIdGenerator, rebuildIdGenerators, registerIdFromUpdateRecord, releaseFileLockAndCloseFileChannel, releaseWindow, setHighId, setRecovered, setStoreNotOk, setWindowPool, toString, unsetRecovered, updateHighId, verifyCorrectTypeDescriptorAndVersion
 
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
getHighId
 

Field Detail

TYPE_DESCRIPTOR

public static final String TYPE_DESCRIPTOR
See Also:
Constant Field Values

RECORD_SIZE

public static final int RECORD_SIZE
See Also:
Constant Field Values
Constructor Detail

RelationshipStore

public RelationshipStore(String fileName,
                         Map<?,?> config)
See AbstractStore#AbstractStore(String, Map)

Method Detail

accept

public void accept(RecordStore.Processor processor,
                   RelationshipRecord record)
Specified by:
accept in interface RecordStore<RelationshipRecord>

getTypeDescriptor

public String getTypeDescriptor()
Description copied from class: CommonAbstractStore
Returns the type and version that identifies this store.

Specified by:
getTypeDescriptor in interface Store
Specified by:
getTypeDescriptor in class CommonAbstractStore
Returns:
This store's implementation type and version identifier

getRecordSize

public int getRecordSize()
Description copied from class: AbstractStore
Returns the fixed size of each record in this store.

Specified by:
getRecordSize in interface RecordStore<RelationshipRecord>
Specified by:
getRecordSize in class AbstractStore
Returns:
The record size

getRecordHeaderSize

public int getRecordHeaderSize()
Specified by:
getRecordHeaderSize in interface RecordStore<RelationshipRecord>

close

public void close()
Description copied from class: CommonAbstractStore
Closes this store. This will cause all buffers and channels to be closed. Requesting an operation from after this method has been invoked is illegal and an exception will be thrown.

This method will start by invoking the CommonAbstractStore.closeStorage() method giving the implementing store way to do anything that it needs to do before the fileChannel is closed.

Specified by:
close in interface RecordStore<RelationshipRecord>
Overrides:
close in class CommonAbstractStore

createStore

public static void createStore(String fileName,
                               IdGeneratorFactory idGeneratorFactory)
Creates a new relationship store contained in fileName If filename is null or the file already exists an IOException is thrown.

Parameters:
fileName - File name of the new relationship store
Throws:
IOException - If unable to create relationship store or name null

getRecord

public RelationshipRecord getRecord(long id)
Specified by:
getRecord in interface RecordStore<RelationshipRecord>

forceGetRecord

public RelationshipRecord forceGetRecord(long id)
Specified by:
forceGetRecord in interface RecordStore<RelationshipRecord>

forceGetRaw

public RelationshipRecord forceGetRaw(long id)
Specified by:
forceGetRaw in interface RecordStore<RelationshipRecord>

getLightRel

public RelationshipRecord getLightRel(long id)

updateRecord

public void updateRecord(RelationshipRecord record,
                         boolean recovered)

updateRecord

public void updateRecord(RelationshipRecord record)
Specified by:
updateRecord in interface RecordStore<RelationshipRecord>

forceUpdateRecord

public void forceUpdateRecord(RelationshipRecord record)
Specified by:
forceUpdateRecord in interface RecordStore<RelationshipRecord>

getChainRecord

public RelationshipRecord getChainRecord(long relId)

getAllWindowPoolStats

public List<WindowPoolStats> getAllWindowPoolStats()
Specified by:
getAllWindowPoolStats in class AbstractStore

logIdUsage

public void logIdUsage(StringLogger logger)
Specified by:
logIdUsage in interface Store


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.