Class RoErasedAccess

java.lang.Object
All Implemented Interfaces:
Access

public final class RoErasedAccess
extends AbstractAccess
A readonly, "erased", database Access object.

This class primarily exists to support readonly forks and snapshots, but also supports other readonly accesses.

Readonly Forks

A readonly Fork sees all the changes made to the base Fork, but forbids modifications. That allows safely passing the readonly fork to foreign code.

A readonly fork forbids accessing the same index that is being modified in the base fork. Also, accessing an index in the readonly fork will make it inaccessible in the base fork.

  • Method Details

    • fromHandle

      public static RoErasedAccess fromHandle​(long nativeHandle, Cleaner cleaner)
      Creates a new erased readonly access from the native handle. The destructor will be registered in the given cleaner.
      Parameters:
      nativeHandle - a handle of the native readonly ErasedAccess object
      cleaner - a cleaner to destroy the native peer and any dependent objects
    • getCleaner

      public Cleaner getCleaner()
      Description copied from class: AbstractAccess
      Returns the cleaner of this access. It is supposed to be used with collections and other objects depending on this access.
      Specified by:
      getCleaner in class AbstractAccess