예제 #1
0
파일: DiskLayer.java 프로젝트: nkhuyu/neo4j
 /**
  * A note on this taking Provider<NeoStore> rather than just neo store: This is a workaround until
  * the cache is removed. Because the neostore may be restarted while the database is running, and
  * because lazy properties keep a reference to the property store, we need a way to resolve the
  * property store on demand for properties in the cache. As such, this takes a provider, and uses
  * that provider to provide property store references when resolving lazy properties.
  */
 public DiskLayer(
     PropertyKeyTokenHolder propertyKeyTokenHolder,
     LabelTokenHolder labelTokenHolder,
     RelationshipTypeTokenHolder relationshipTokenHolder,
     SchemaStorage schemaStorage,
     final Provider<NeoStore> neoStoreProvider,
     IndexingService indexService) {
   this.relationshipTokenHolder = relationshipTokenHolder;
   this.schemaStorage = schemaStorage;
   this.indexService = indexService;
   this.propertyKeyTokenHolder = propertyKeyTokenHolder;
   this.labelTokenHolder = labelTokenHolder;
   this.neoStore = neoStoreProvider.instance();
   this.nodeStore = this.neoStore.getNodeStore();
   this.relationshipStore = this.neoStore.getRelationshipStore();
   this.propertyStore = this.neoStore.getPropertyStore();
   this.propertyStoreProvider = new PropertyStoreProvider(neoStoreProvider);
 }
예제 #2
0
 @Override
 public long generate(TransactionRepresentation transaction) {
   return transactionIdStore.instance().nextCommittingTransactionId();
 }
예제 #3
0
파일: DiskLayer.java 프로젝트: nkhuyu/neo4j
 @Override
 public PropertyStore instance() {
   return neoStoreProvider.instance().getPropertyStore();
 }