Class MapPolicy

java.lang.Object
com.aerospike.client.cdt.MapPolicy

public final class MapPolicy extends Object
Map policy directives when creating a map and writing map items.
  • Field Details

    • Default

      public static final MapPolicy Default
      Default unordered unique key map with normal put semantics.
    • attributes

      public final int attributes
    • flags

      public final int flags
    • itemCommand

      public final int itemCommand
    • itemsCommand

      public final int itemsCommand
  • Constructor Details

    • MapPolicy

      public MapPolicy()
      Default constructor. Create unordered unique key map when map does not exist. Use normal update mode when writing map items.
    • MapPolicy

      public MapPolicy(MapOrder order, MapWriteMode writeMode)
      Create unique key map with specified order when map does not exist. Use specified write mode when writing map items.

      This constructor should only be used for server versions < 4.3. MapPolicy(MapOrder,int) is recommended for server versions >= 4.3.

    • MapPolicy

      public MapPolicy(MapOrder order, int flags)
      Create unique key map with specified order when map does not exist.
      Parameters:
      order - map order
      flags - map write flags. See MapWriteFlags.
    • MapPolicy

      public MapPolicy(MapOrder order, int flags, boolean persistIndex)
      Create unique key map with specified order and persist index flag when map does not exist.
      Parameters:
      order - map order
      flags - map write flags. See MapWriteFlags.
      persistIndex - if true, persist map index. A map index improves lookup performance, but requires more storage. A map index can be created for a top-level ordered map only. Nested and unordered map indexes are not supported.