Class Snapshot


  • public final class Snapshot
    extends View
    A snapshot is a read-only, immutable database view.

    A snapshot represents database state at the time it was created. Immutability implies that:

    • Write operations are prohibited; an attempt to perform a modifying operation will result in an UnsupportedOperationException.
    • Database state represented by this snapshot does not change. Newly created snapshots, however, might correspond to a new database state.
    See Also:
    Fork
    • Method Detail

      • newInstance

        public static Snapshot newInstance​(long nativeHandle,
                                           Cleaner cleaner)
        Creates a new owning Snapshot proxy.
        Parameters:
        nativeHandle - a handle of the native Snapshot object
      • newInstance

        public static Snapshot newInstance​(long nativeHandle,
                                           boolean owningHandle,
                                           Cleaner cleaner)
        Creates a new Snapshot proxy.
        Parameters:
        nativeHandle - a handle of the native Snapshot object
        owningHandle - whether a proxy owns the corresponding native object and is responsible to clean it up
        cleaner - a cleaner to destroy the native object