Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 @Override
 public long generate(TransactionRepresentation transaction) {
   return transactionIdStore.instance().nextCommittingTransactionId();
 }
Exemplo n.º 3
0
 @Override
 public PropertyStore instance() {
   return neoStoreProvider.instance().getPropertyStore();
 }