org.quartz.utils
Class StringKeyDirtyFlagMap

java.lang.Object
  extended by org.quartz.utils.DirtyFlagMap<String,Object>
      extended by org.quartz.utils.StringKeyDirtyFlagMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>
Direct Known Subclasses:
JobDataMap, SchedulerContext

public class StringKeyDirtyFlagMap
extends DirtyFlagMap<String,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
Map.Entry<K,V>
 
Constructor Summary
StringKeyDirtyFlagMap()
           
StringKeyDirtyFlagMap(int initialCapacity)
           
StringKeyDirtyFlagMap(int initialCapacity, float loadFactor)
           
 
Method Summary
 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.
 boolean equals(Object obj)
           
 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.
 boolean getBoolean(String key)
           Retrieve the identified boolean value from the StringKeyDirtyFlagMap.
 char getChar(String key)
           Retrieve the identified char value from the StringKeyDirtyFlagMap.
 double getDouble(String key)
           Retrieve the identified double value from the StringKeyDirtyFlagMap.
 float getFloat(String key)
           Retrieve the identified float value from the StringKeyDirtyFlagMap.
 int getInt(String key)
           Retrieve the identified int value from the StringKeyDirtyFlagMap.
 String[] getKeys()
          Get a copy of the Map's String keys in an array of Strings.
 long getLong(String key)
           Retrieve the identified long value from the StringKeyDirtyFlagMap.
 String getString(String key)
           Retrieve the identified String value from the StringKeyDirtyFlagMap.
 int hashCode()
           
 void put(String key, boolean value)
           Adds the given boolean value to the StringKeyDirtyFlagMap.
 void put(String key, char value)
           Adds the given char value to the StringKeyDirtyFlagMap.
 void put(String key, double value)
           Adds the given double value to the StringKeyDirtyFlagMap.
 void put(String key, float value)
           Adds the given float value to the StringKeyDirtyFlagMap.
 void put(String key, int value)
           Adds the given int value to the StringKeyDirtyFlagMap.
 void put(String key, long value)
           Adds the given long value to the StringKeyDirtyFlagMap.
 Object put(String key, Object value)
           Adds the given Object value to the StringKeyDirtyFlagMap.
 void put(String key, String value)
           Adds the given String value to the StringKeyDirtyFlagMap.
 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.
 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.
 
Methods inherited from class org.quartz.utils.DirtyFlagMap
clear, clearDirtyFlag, clone, containsKey, containsValue, entrySet, get, getWrappedMap, isDirty, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringKeyDirtyFlagMap

public StringKeyDirtyFlagMap()

StringKeyDirtyFlagMap

public StringKeyDirtyFlagMap(int initialCapacity)

StringKeyDirtyFlagMap

public StringKeyDirtyFlagMap(int initialCapacity,
                             float loadFactor)
Method Detail

equals

public boolean equals(Object obj)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class DirtyFlagMap<String,Object>

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,Object>
Overrides:
hashCode in class DirtyFlagMap<String,Object>

getKeys

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


setAllowsTransientData

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

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

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

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(String key,
                int value)

Adds the given int value to the StringKeyDirtyFlagMap.


put

public void put(String key,
                long value)

Adds the given long value to the StringKeyDirtyFlagMap.


put

public void put(String key,
                float value)

Adds the given float value to the StringKeyDirtyFlagMap.


put

public void put(String key,
                double value)

Adds the given double value to the StringKeyDirtyFlagMap.


put

public void put(String key,
                boolean value)

Adds the given boolean value to the StringKeyDirtyFlagMap.


put

public void put(String key,
                char value)

Adds the given char value to the StringKeyDirtyFlagMap.


put

public void put(String key,
                String value)

Adds the given String value to the StringKeyDirtyFlagMap.


put

public Object put(String key,
                  Object value)

Adds the given Object value to the StringKeyDirtyFlagMap.

Specified by:
put in interface Map<String,Object>
Overrides:
put in class DirtyFlagMap<String,Object>

getInt

public int getInt(String key)

Retrieve the identified int value from the StringKeyDirtyFlagMap.

Throws:
ClassCastException - if the identified object is not an Integer.

getLong

public long getLong(String key)

Retrieve the identified long value from the StringKeyDirtyFlagMap.

Throws:
ClassCastException - if the identified object is not a Long.

getFloat

public float getFloat(String key)

Retrieve the identified float value from the StringKeyDirtyFlagMap.

Throws:
ClassCastException - if the identified object is not a Float.

getDouble

public double getDouble(String key)

Retrieve the identified double value from the StringKeyDirtyFlagMap.

Throws:
ClassCastException - if the identified object is not a Double.

getBoolean

public boolean getBoolean(String key)

Retrieve the identified boolean value from the StringKeyDirtyFlagMap.

Throws:
ClassCastException - if the identified object is not a Boolean.

getChar

public char getChar(String key)

Retrieve the identified char value from the StringKeyDirtyFlagMap.

Throws:
ClassCastException - if the identified object is not a Character.

getString

public String getString(String key)

Retrieve the identified String value from the StringKeyDirtyFlagMap.

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


Copyright 2001-2019, Terracotta, Inc.