public class DirectRecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL> extends Object implements org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY,RECORD,ADDITIONAL>
Constructor and Description |
---|
DirectRecordAccess(org.neo4j.kernel.impl.store.AbstractRecordStore<RECORD> store,
org.neo4j.kernel.impl.transaction.state.RecordAccess.Loader<KEY,RECORD,ADDITIONAL> loader) |
Modifier and Type | Method and Description |
---|---|
Iterable<org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL>> |
changes() |
int |
changeSize() |
void |
close()
Closes the record access.
|
void |
commit() |
org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> |
create(KEY key,
ADDITIONAL additionalData)
Creates a new record with the given
key . |
org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> |
getIfLoaded(KEY key) |
org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> |
getOrLoad(KEY key,
ADDITIONAL additionalData)
Gets an already loaded record, or loads it as part of this call if it wasn't.
|
void |
setTo(KEY key,
RECORD newRecord,
ADDITIONAL additionalData) |
public DirectRecordAccess(org.neo4j.kernel.impl.store.AbstractRecordStore<RECORD> store, org.neo4j.kernel.impl.transaction.state.RecordAccess.Loader<KEY,RECORD,ADDITIONAL> loader)
public org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> getOrLoad(KEY key, ADDITIONAL additionalData)
org.neo4j.kernel.impl.transaction.state.RecordAccess
RecordAccess.RecordProxy
returned has means of communicating when to get access to the actual record for reading or writing.
With that information any additional loading or storing can be inferred for the specific
use case (implementation).getOrLoad
in interface org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL>
key
- the record key.additionalData
- additional data to put in the record after loaded.RecordAccess.RecordProxy
for the record for key
.public org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> create(KEY key, ADDITIONAL additionalData)
org.neo4j.kernel.impl.transaction.state.RecordAccess
key
. Any additionalData
is set in the
record before returning.create
in interface org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL>
key
- the record key.additionalData
- additional data to put in the record after loaded.RecordAccess.RecordProxy
for the record for key
.public org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> getIfLoaded(KEY key)
getIfLoaded
in interface org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL>
public void setTo(KEY key, RECORD newRecord, ADDITIONAL additionalData)
setTo
in interface org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL>
public int changeSize()
changeSize
in interface org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL>
public Iterable<org.neo4j.kernel.impl.transaction.state.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL>> changes()
changes
in interface org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL>
public void close()
org.neo4j.kernel.impl.transaction.state.RecordAccess
close
in interface org.neo4j.kernel.impl.transaction.state.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord,ADDITIONAL>
public void commit()
Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.