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

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

public class PropertyIndexStore
extends AbstractStore
implements Store, RecordStore<PropertyIndexRecord>

Implementation of the property store.


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
PropertyIndexStore(String fileName, Map<?,?> config)
           
 
Method Summary
 void accept(RecordStore.Processor processor, PropertyIndexRecord record)
           
 Collection<DynamicRecord> allocateKeyRecords(int keyBlockId, byte[] chars)
           
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, IdGeneratorFactory idGeneratorFactory)
           
 void flushAll()
           
 PropertyIndexRecord forceGetRaw(long id)
           
 PropertyIndexRecord forceGetRecord(long id)
           
 void forceUpdateRecord(PropertyIndexRecord record)
           
 void freeBlockId(int id)
           
 List<WindowPoolStats> getAllWindowPoolStats()
           
 PropertyIndexRecord getLightRecord(int id)
           
 PropertyIndexData getPropertyIndex(int id)
           
 PropertyIndexData getPropertyIndex(int id, boolean recovered)
           
 PropertyIndexData[] getPropertyIndexes(int count)
           
 PropertyIndexRecord getRecord(int id)
           
 PropertyIndexRecord getRecord(long id)
           
 int getRecordHeaderSize()
           
 int getRecordSize()
          Returns the fixed size of each record in this store.
 String getStringFor(PropertyIndexRecord propRecord)
           
 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 makeHeavy(PropertyIndexRecord record)
           
 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.
 int nextKeyBlockId()
           
 void rebuildIdGenerators()
           
protected  void setRecovered()
           
protected  void unsetRecovered()
           
 void updateIdGenerators()
           
 void updateRecord(PropertyIndexRecord record)
           
 void updateRecord(PropertyIndexRecord 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, createIdGenerator, freeId, getConfig, getFileChannel, getFileSystem, getHighestPossibleIdInUse, getHighId, getIdType, getIfMemoryMapped, getNumberOfIdsInUse, getStorageFileName, getStoreDir, getStoreOk, getTypeAndVersionDescriptor, getWindowPoolStats, isInRecoveryMode, loadStorage, logVersions, longFromIntAndMod, nextId, openIdGenerator, openIdGenerator, openReadOnlyIdGenerator, registerIdFromUpdateRecord, releaseFileLockAndCloseFileChannel, releaseWindow, setHighId, setStoreNotOk, setWindowPool, toString, 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
Constructor Detail

PropertyIndexStore

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

accept

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

initStorage

protected void initStorage()
Description copied from class: CommonAbstractStore
Called from the constructor after the end header has been checked. The store implementation can setup it's persistence windows and other resources that are needed by overriding this implementation.

This default implementation does nothing.

Overrides:
initStorage in class CommonAbstractStore

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

getRecordHeaderSize

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

setRecovered

protected void setRecovered()
Overrides:
setRecovered in class CommonAbstractStore

unsetRecovered

protected void unsetRecovered()
Overrides:
unsetRecovered in class CommonAbstractStore

makeStoreOk

public void makeStoreOk()
Description copied from class: CommonAbstractStore
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.

Overrides:
makeStoreOk in class CommonAbstractStore

rebuildIdGenerators

public void rebuildIdGenerators()
Overrides:
rebuildIdGenerators in class CommonAbstractStore

updateIdGenerators

public void updateIdGenerators()

freeBlockId

public void freeBlockId(int id)

closeStorage

protected void closeStorage()
Description copied from class: CommonAbstractStore
This method should close/release all resources that the implementation of this store has allocated and is called just before the close() method returns. Override this method to clean up stuff created in CommonAbstractStore.initStorage() method.

This default implementation does nothing.

Overrides:
closeStorage in class CommonAbstractStore

flushAll

public void flushAll()
Overrides:
flushAll in class CommonAbstractStore

createStore

public static void createStore(String fileName,
                               IdGeneratorFactory idGeneratorFactory)

getPropertyIndexes

public PropertyIndexData[] getPropertyIndexes(int count)

getPropertyIndex

public PropertyIndexData getPropertyIndex(int id)

getPropertyIndex

public PropertyIndexData getPropertyIndex(int id,
                                          boolean recovered)

getRecord

public PropertyIndexRecord getRecord(int id)

getRecord

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

forceGetRecord

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

forceGetRaw

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

allocateKeyRecords

public Collection<DynamicRecord> allocateKeyRecords(int keyBlockId,
                                                    byte[] chars)

getLightRecord

public PropertyIndexRecord getLightRecord(int id)

updateRecord

public void updateRecord(PropertyIndexRecord record,
                         boolean recovered)

updateRecord

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

forceUpdateRecord

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

nextKeyBlockId

public int nextKeyBlockId()

makeHeavy

public void makeHeavy(PropertyIndexRecord record)

getStringFor

public String getStringFor(PropertyIndexRecord propRecord)

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.