Enum StorageFormat

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

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

      Enum Constants 
      Enum Constant Description
      BSON
      Store and serialize JSON documents in the BSON format (https://bsonspec.org/).
      PDX
      Store and serialize JSON documents in the GemFire PDX format.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static StorageFormat valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static StorageFormat[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static StorageFormat[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StorageFormat c : StorageFormat.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StorageFormat valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null