DirectRecordAccess (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.unsafe.batchinsert

## Class DirectRecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.AbstractBaseRecord,ADDITIONAL>

- java.lang.Object
- - org.neo4j.unsafe.batchinsert.DirectRecordAccess<KEY,RECORD,ADDITIONAL>

- All Implemented Interfaces:
    org.neo4j.kernel.impl.nioneo.xa.RecordAccess<KEY,RECORD,ADDITIONAL>

      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>

  Provides direct access to records in a store. Changes are batched up and written whenever `commit()` is called, or `close()` for that matter.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.neo4j.kernel.impl.nioneo.xa.RecordAccess

      `org.neo4j.kernel.impl.nioneo.xa.RecordAccess.Loader<KEY,RECORD,ADDITIONAL>, org.neo4j.kernel.impl.nioneo.xa.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL>`

  - ### Constructor Summary

    Constructors
    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)`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DirectRecordAccess

          public DirectRecordAccess(org.neo4j.kernel.impl.nioneo.store.AbstractRecordStore<RECORD> store,
                            org.neo4j.kernel.impl.nioneo.xa.RecordAccess.Loader<KEY,RECORD,ADDITIONAL> loader)

  - ### Method Detail

    - #### getOrLoad

          public org.neo4j.kernel.impl.nioneo.xa.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> getOrLoad(KEY key,
                                                                                                  ADDITIONAL additionalData)

      Description copied from interface: `org.neo4j.kernel.impl.nioneo.xa.RecordAccess`
      Gets an already loaded record, or loads it as part of this call if it wasn't. The `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).
      Specified by:
        `getOrLoad` in interface `org.neo4j.kernel.impl.nioneo.xa.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.AbstractBaseRecord,ADDITIONAL>`
      Parameters:
        `key` - the record key.
        `additionalData` - additional data to put in the record after loaded.
      Returns:
        a `RecordAccess.RecordProxy` for the record for `key`.

    - #### create

          public org.neo4j.kernel.impl.nioneo.xa.RecordAccess.RecordProxy<KEY,RECORD,ADDITIONAL> create(KEY key,
                                                                                               ADDITIONAL additionalData)

      Description copied from interface: `org.neo4j.kernel.impl.nioneo.xa.RecordAccess`
      Creates a new record with the given `key`. Any `additionalData` is set in the record before returning.
      Specified by:
        `create` in interface `org.neo4j.kernel.impl.nioneo.xa.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.AbstractBaseRecord,ADDITIONAL>`
      Parameters:
        `key` - the record key.
        `additionalData` - additional data to put in the record after loaded.
      Returns:
        a `RecordAccess.RecordProxy` for the record for `key`.

    - #### close

          public void close()

      Description copied from interface: `org.neo4j.kernel.impl.nioneo.xa.RecordAccess`
      Closes the record access.
      Specified by:
        `close` in interface `org.neo4j.kernel.impl.nioneo.xa.RecordAccess<KEY extends Comparable<KEY>,RECORD extends org.neo4j.kernel.impl.nioneo.store.AbstractBaseRecord,ADDITIONAL>`

    - #### commit

          public void commit()

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.