public class DirectRecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.AbstractBaseRecord,ADDITIONAL> extends Object implements org.neo4j.kernel.impl.nioneo.xa.RecordAccess<KEY,RECORD,ADDITIONAL>
Constructor and Description |
---|
DirectRecordAccess(org.neo4j.kernel.impl.nioneo.store.AbstractRecordStore<RECORD> store,
org.neo4j.kernel.impl.nioneo.xa.RecordAccess.Loader<KEY,RECORD,ADDITIONAL> loader) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the record access.
|
void |
commit() |
org.neo4j.kernel.impl.nioneo.xa.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> |
create(KEY key,
ADDITIONAL additionalData)
Creates a new record with the given
key . |
org.neo4j.kernel.impl.nioneo.xa.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.
|
public DirectRecordAccess(org.neo4j.kernel.impl.nioneo.store.AbstractRecordStore<RECORD> store, org.neo4j.kernel.impl.nioneo.xa.RecordAccess.Loader<KEY,RECORD,ADDITIONAL> loader)
public org.neo4j.kernel.impl.nioneo.xa.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> getOrLoad(KEY key, ADDITIONAL additionalData)
org.neo4j.kernel.impl.nioneo.xa.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.nioneo.xa.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.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.nioneo.xa.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> create(KEY key, ADDITIONAL additionalData)
org.neo4j.kernel.impl.nioneo.xa.RecordAccess
key
. Any additionalData
is set in the
record before returning.create
in interface org.neo4j.kernel.impl.nioneo.xa.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.AbstractBaseRecord,ADDITIONAL>
key
- the record key.additionalData
- additional data to put in the record after loaded.RecordAccess.RecordProxy
for the record for key
.public void close()
org.neo4j.kernel.impl.nioneo.xa.RecordAccess
close
in interface org.neo4j.kernel.impl.nioneo.xa.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.AbstractBaseRecord,ADDITIONAL>
public void commit()
Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.