Enum Class StorageFormat

java.lang.Object
java.lang.Enum<StorageFormat>
org.apache.geode.json.StorageFormat
All Implemented Interfaces:
Serializable, Comparable<StorageFormat>, Constable

public enum StorageFormat extends Enum<StorageFormat>
The format used to store a JsonDocument in memory and for serialization.
  • Enum Constant Details

    • PDX

      public static final StorageFormat PDX
      Store and serialize JSON documents in the GemFire PDX format. This format is optimal if many documents reuse the same schema. Since the schema is stored in a separate registry, the size of field names does not impact the serialized size of the document. But if every document has its own schema, then the cost of generating and storing the schema can cause this format to perform badly.
    • BSON

      public static final StorageFormat BSON
      Store and serialize JSON documents in the BSON format (https://bsonspec.org/). This format is optimal if documents tend to have a unique schema. It also performs best with a smaller number of fields or operations that get the entire document instead of a single field of the document. Since the schema is stored with the data, the size of field names will increase the size of the document when it is stored and serialized.
  • Method Details

    • values

      public static StorageFormat[] 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 StorageFormat 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