Enum PredefinedMemoryRatio

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PredefinedMemoryRatio>

    public enum PredefinedMemoryRatio
    extends java.lang.Enum<PredefinedMemoryRatio>
    Predefined memory configuration modes. The predefined modes specify the percentage of memory (between 0 and 100) a component will use rather then fixed amount of memory. A configuration with actual memory limits can be created using the withAvailableMemory(long, long) function.
    Since:
    5.0
    Version:
    5.0
    Author:
    Evren
    • Enum Constant Detail

      • READ_OPTIMIZED

        public static final PredefinedMemoryRatio READ_OPTIMIZED
        Memory configuration optimized for read queries. Updates should be avoided as much as possible,
      • DEFAULT

        public static final PredefinedMemoryRatio DEFAULT
        Memory configuration optimized for mixed workloads.
      • WRITE_OPTIMIZED

        public static final PredefinedMemoryRatio WRITE_OPTIMIZED
        Memory configuration optimized for updates. This mode is suitable for write-heavy applications where reads are infrequent and/or do not require much memory.
      • BULK_LOAD

        public static final PredefinedMemoryRatio BULK_LOAD
        Memory configuration optimized for bulk loads. This mode is suitable for bulk loading very large amounts of data (many billions of triples). After bulk loading is complete this mode should be changed back to another mode.
    • Method Detail

      • values

        public static PredefinedMemoryRatio[] 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 (PredefinedMemoryRatio c : PredefinedMemoryRatio.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PredefinedMemoryRatio 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
      • withAvailableMemory

        public MemoryConfiguration withAvailableMemory​(long nativeMem,
                                                       long heapMem)
        Returns a new configuration object that applies the percentages defined in this instance to the given available memory amounts.
        Parameters:
        nativeMem - available native memory in bytes. Equivalent to java direct memory (set by MaxDirectMemorySize CLI parameter)
        heapMem - available heap memory in bytes.
        Returns:
        new configuration with actual memory values for each component
      • setRatios

        public void setRatios​(java.util.Map<java.lang.String,​java.lang.Object> theJsonMap)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<PredefinedMemoryRatio>