Module lmdbjava
Package org.lmdbjava

Enum Class DbiFlags

java.lang.Object
java.lang.Enum<DbiFlags>
org.lmdbjava.DbiFlags
All Implemented Interfaces:
Serializable, Comparable<DbiFlags>, Constable, MaskedFlag

public enum DbiFlags extends Enum<DbiFlags> implements MaskedFlag
Flags for use when opening a Dbi.
  • Enum Constant Details

    • MDB_REVERSEKEY

      public static final DbiFlags MDB_REVERSEKEY
      Use reverse string keys.

      Keys are strings to be compared in reverse order, from the end of the strings to the beginning. By default, keys are treated as strings and compared from beginning to end.

    • MDB_DUPSORT

      public static final DbiFlags MDB_DUPSORT
      Use sorted duplicates.

      Duplicate keys may be used in the database. Or, from another perspective, keys may have multiple data items, stored in sorted order. By default keys must be unique and may have only a single data item.

    • MDB_INTEGERKEY

      public static final DbiFlags MDB_INTEGERKEY
      Numeric keys in native byte order: either unsigned int or size_t. The keys must all be of the same size.
    • MDB_DUPFIXED

      public static final DbiFlags MDB_DUPFIXED
      With MDB_DUPSORT, sorted dup items have fixed size.

      This flag may only be used in combination with MDB_DUPSORT. This option tells the library that the data items for this database are all the same size, which allows further optimizations in storage and retrieval. When all data items are the same size, the SeekOp.MDB_GET_MULTIPLE and SeekOp.MDB_NEXT_MULTIPLE cursor operations may be used to retrieve multiple items at once.

    • MDB_INTEGERDUP

      public static final DbiFlags MDB_INTEGERDUP
      With MDB_DUPSORT, dups are MDB_INTEGERKEY-style integers.

      This option specifies that duplicate data items are binary integers, similar to MDB_INTEGERKEY keys.

    • MDB_REVERSEDUP

      public static final DbiFlags MDB_REVERSEDUP
      With MDB_DUPSORT, use reverse string dups.

      This option specifies that duplicate data items should be compared as strings in reverse order.

    • MDB_CREATE

      public static final DbiFlags MDB_CREATE
      Create the named database if it doesn't exist.

      This option is not allowed in a read-only transaction or a read-only environment.

  • Method Details

    • values

      public static DbiFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DbiFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getMask

      public int getMask()
      Description copied from interface: MaskedFlag
      Obtains the integer value for this enum which can be included in a mask.
      Specified by:
      getMask in interface MaskedFlag
      Returns:
      the integer value for combination into a mask