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

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.NodeStore
All Implemented Interfaces:
RecordStore<NodeRecord>, Store

public class NodeStore
extends AbstractStore
implements Store, RecordStore<NodeRecord>

Implementation of the node 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
NodeStore(String fileName, Map<?,?> config)
           
 
Method Summary
 void accept(RecordStore.Processor processor, NodeRecord record)
           
static void createStore(String fileName, Map<?,?> config)
          Creates a new node store contained in fileName If filename is null or the file already exists an IOException is thrown.
 NodeRecord forceGetRaw(long id)
           
 NodeRecord forceGetRecord(long id)
           
 void forceUpdateRecord(NodeRecord record)
           
 List<WindowPoolStats> getAllWindowPoolStats()
           
 NodeRecord 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.
 boolean loadLightNode(long id)
           
 void logIdUsage(StringLogger logger)
           
 void updateRecord(NodeRecord record)
           
 void updateRecord(NodeRecord 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, close, 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
close, 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

NodeStore

public NodeStore(String fileName,
                 Map<?,?> config)
Method Detail

accept

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

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<NodeRecord>
Specified by:
getRecordSize in class AbstractStore
Returns:
The record size

getRecordHeaderSize

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

createStore

public static void createStore(String fileName,
                               Map<?,?> config)
Creates a new node store contained in fileName If filename is null or the file already exists an IOException is thrown.

Parameters:
fileName - File name of the new node store
config - Map of configuration parameters

getRecord

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

forceGetRecord

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

forceGetRaw

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

updateRecord

public void updateRecord(NodeRecord record,
                         boolean recovered)

forceUpdateRecord

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

updateRecord

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

loadLightNode

public boolean loadLightNode(long id)

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.