Class StringKeyDirtyFlagMap

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>
    Direct Known Subclasses:
    JobDataMap, SchedulerContext

    public class StringKeyDirtyFlagMap
    extends DirtyFlagMap<java.lang.String,​java.lang.Object>

    An implementation of Map that wraps another Map and flags itself 'dirty' when it is modified, enforces that all keys are Strings.

    All allowsTransientData flag related methods are deprecated as of version 1.6.

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean containsTransientData()
      Deprecated.
      JDBCJobStores no longer prune out transient data.
      boolean equals​(java.lang.Object obj)  
      boolean getAllowsTransientData()
      Deprecated.
      JDBCJobStores no longer prune out transient data.
      boolean getBoolean​(java.lang.String key)
      Retrieve the identified boolean value from the StringKeyDirtyFlagMap.
      char getChar​(java.lang.String key)
      Retrieve the identified char value from the StringKeyDirtyFlagMap.
      double getDouble​(java.lang.String key)
      Retrieve the identified double value from the StringKeyDirtyFlagMap.
      float getFloat​(java.lang.String key)
      Retrieve the identified float value from the StringKeyDirtyFlagMap.
      int getInt​(java.lang.String key)
      Retrieve the identified int value from the StringKeyDirtyFlagMap.
      java.lang.String[] getKeys()
      Get a copy of the Map's String keys in an array of Strings.
      long getLong​(java.lang.String key)
      Retrieve the identified long value from the StringKeyDirtyFlagMap.
      java.lang.String getString​(java.lang.String key)
      Retrieve the identified String value from the StringKeyDirtyFlagMap.
      int hashCode()  
      void put​(java.lang.String key, boolean value)
      Adds the given boolean value to the StringKeyDirtyFlagMap.
      void put​(java.lang.String key, char value)
      Adds the given char value to the StringKeyDirtyFlagMap.
      void put​(java.lang.String key, double value)
      Adds the given double value to the StringKeyDirtyFlagMap.
      void put​(java.lang.String key, float value)
      Adds the given float value to the StringKeyDirtyFlagMap.
      void put​(java.lang.String key, int value)
      Adds the given int value to the StringKeyDirtyFlagMap.
      void put​(java.lang.String key, long value)
      Adds the given long value to the StringKeyDirtyFlagMap.
      java.lang.Object put​(java.lang.String key, java.lang.Object value)
      Adds the given Object value to the StringKeyDirtyFlagMap.
      void put​(java.lang.String key, java.lang.String value)
      Adds the given String value to the StringKeyDirtyFlagMap.
      void removeTransientData()
      Deprecated.
      JDBCJobStores no longer prune out transient data.
      void setAllowsTransientData​(boolean allowsTransientData)
      Deprecated.
      JDBCJobStores no longer prune out transient data.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • StringKeyDirtyFlagMap

        public StringKeyDirtyFlagMap()
      • StringKeyDirtyFlagMap

        public StringKeyDirtyFlagMap​(int initialCapacity)
      • StringKeyDirtyFlagMap

        public StringKeyDirtyFlagMap​(int initialCapacity,
                                     float loadFactor)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        equals in class DirtyFlagMap<java.lang.String,​java.lang.Object>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        hashCode in class DirtyFlagMap<java.lang.String,​java.lang.Object>
      • getKeys

        public java.lang.String[] getKeys()
        Get a copy of the Map's String keys in an array of Strings.
      • setAllowsTransientData

        @Deprecated
        public void setAllowsTransientData​(boolean allowsTransientData)
        Deprecated.
        JDBCJobStores no longer prune out transient data. If you include non-Serializable values in the Map, you will now get an exception when attempting to store it in a database.
        Tell the StringKeyDirtyFlagMap that it should allow non-Serializable values. Enforces that the Map doesn't already include transient data.
      • getAllowsTransientData

        @Deprecated
        public boolean getAllowsTransientData()
        Deprecated.
        JDBCJobStores no longer prune out transient data. If you include non-Serializable values in the Map, you will now get an exception when attempting to store it in a database.
        Whether the StringKeyDirtyFlagMap allows non-Serializable values.
      • containsTransientData

        @Deprecated
        public boolean containsTransientData()
        Deprecated.
        JDBCJobStores no longer prune out transient data. If you include non-Serializable values in the Map, you will now get an exception when attempting to store it in a database.
        Determine whether any values in this Map do not implement Serializable. Always returns false if this Map is flagged to not allow transient data.
      • removeTransientData

        @Deprecated
        public void removeTransientData()
        Deprecated.
        JDBCJobStores no longer prune out transient data. If you include non-Serializable values in the Map, you will now get an exception when attempting to store it in a database.
        Removes any data values in the map that are non-Serializable. Does nothing if this Map does not allow transient data.
      • put

        public void put​(java.lang.String key,
                        int value)

        Adds the given int value to the StringKeyDirtyFlagMap.

      • put

        public void put​(java.lang.String key,
                        long value)

        Adds the given long value to the StringKeyDirtyFlagMap.

      • put

        public void put​(java.lang.String key,
                        float value)

        Adds the given float value to the StringKeyDirtyFlagMap.

      • put

        public void put​(java.lang.String key,
                        double value)

        Adds the given double value to the StringKeyDirtyFlagMap.

      • put

        public void put​(java.lang.String key,
                        boolean value)

        Adds the given boolean value to the StringKeyDirtyFlagMap.

      • put

        public void put​(java.lang.String key,
                        char value)

        Adds the given char value to the StringKeyDirtyFlagMap.

      • put

        public void put​(java.lang.String key,
                        java.lang.String value)

        Adds the given String value to the StringKeyDirtyFlagMap.

      • put

        public java.lang.Object put​(java.lang.String key,
                                    java.lang.Object value)

        Adds the given Object value to the StringKeyDirtyFlagMap.

        Specified by:
        put in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        put in class DirtyFlagMap<java.lang.String,​java.lang.Object>
      • getInt

        public int getInt​(java.lang.String key)

        Retrieve the identified int value from the StringKeyDirtyFlagMap.

        Throws:
        java.lang.ClassCastException - if the identified object is not an Integer.
      • getLong

        public long getLong​(java.lang.String key)

        Retrieve the identified long value from the StringKeyDirtyFlagMap.

        Throws:
        java.lang.ClassCastException - if the identified object is not a Long.
      • getFloat

        public float getFloat​(java.lang.String key)

        Retrieve the identified float value from the StringKeyDirtyFlagMap.

        Throws:
        java.lang.ClassCastException - if the identified object is not a Float.
      • getDouble

        public double getDouble​(java.lang.String key)

        Retrieve the identified double value from the StringKeyDirtyFlagMap.

        Throws:
        java.lang.ClassCastException - if the identified object is not a Double.
      • getBoolean

        public boolean getBoolean​(java.lang.String key)

        Retrieve the identified boolean value from the StringKeyDirtyFlagMap.

        Throws:
        java.lang.ClassCastException - if the identified object is not a Boolean.
      • getChar

        public char getChar​(java.lang.String key)

        Retrieve the identified char value from the StringKeyDirtyFlagMap.

        Throws:
        java.lang.ClassCastException - if the identified object is not a Character.
      • getString

        public java.lang.String getString​(java.lang.String key)

        Retrieve the identified String value from the StringKeyDirtyFlagMap.

        Throws:
        java.lang.ClassCastException - if the identified object is not a String.