Codota Logo
StringKeyDirtyFlagMap
Code IndexAdd Codota to your IDE (free)

How to use
StringKeyDirtyFlagMap
in
org.quartz.utils

Best Java code snippets using org.quartz.utils.StringKeyDirtyFlagMap (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: quartz-scheduler/quartz

/**
 * Tell the <code>StringKeyDirtyFlagMap</code> that it should
 * allow non-<code>Serializable</code> values.  Enforces that the Map 
 * doesn't already include transient data.
 * 
 * @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.
 */
public void setAllowsTransientData(boolean allowsTransientData) {

  if (containsTransientData() && !allowsTransientData) {
    throw new IllegalStateException(
      "Cannot set property 'allowsTransientData' to 'false' "
        + "when data map contains non-serializable objects.");
  }

  this.allowsTransientData = allowsTransientData;
}
origin: quartz-scheduler/quartz

  /**
   * <p>
   * Retrieve the identified <code>String</code> value from the <code>StringKeyDirtyFlagMap</code>.
   * </p>
   * 
   * @throws ClassCastException
   *           if the identified object is not a String.
   */
  public String getString(String key) {
    Object obj = get(key);
  
    try {
      return (String) obj;
    } catch (Exception e) {
      throw new ClassCastException("Identified object is not a String.");
    }
  }
}
origin: quartz-scheduler/quartz

/**
 * Removes any data values in the map that are non-Serializable.  Does 
 * nothing if this Map does not allow transient data.
 * 
 * @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.
 */
public void removeTransientData() {
  if (!getAllowsTransientData()) { // short circuit...
    return;
  }

  String[] keys = getKeys();
  for (int i = 0; i < keys.length; i++) {
    Object o = super.get(keys[i]);
    if (!(o instanceof Serializable)) {
      remove(keys[i]);
    }
  }
}
origin: quartz-scheduler/quartz

/**
 * Get a copy of the Map's String keys in an array of Strings.
 */
public String[] getKeys() {
  return keySet().toArray(new String[size()]);
}
origin: quartz-scheduler/quartz

/**
 * Determine whether any values in this Map do not implement 
 * <code>Serializable</code>.  Always returns false if this Map
 * is flagged to not allow transient data.
 * 
 * @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.
 */
public boolean containsTransientData() {
  if (!getAllowsTransientData()) { // short circuit...
    return false;
  }

  String[] keys = getKeys();
  for (int i = 0; i < keys.length; i++) {
    Object o = super.get(keys[i]);
    if (!(o instanceof Serializable)) {
      return true;
    }
  }

  return false;
}
origin: quartz-scheduler/quartz

/**
 * <p>
 * Adds the given <code>Long</code> value as a string version to the
 * <code>Job</code>'s data map.
 * </p>
 */
public void putAsString(String key, Long value) {
  String strValue = value.toString();
  super.put(key, strValue);
}
origin: quartz-scheduler/quartz

@Override
public int hashCode()
{
  return getWrappedMap().hashCode();
}

origin: quartz-scheduler/quartz

/**
 * <p>
 * Adds the given <code>float</code> value as a string version to the
 * <code>Job</code>'s data map.
 * </p>
 */
public void putAsString(String key, float value) {
  String strValue = Float.toString(value);
  super.put(key, strValue);
}
origin: quartz-scheduler/quartz

/**
 * Get a copy of the Map's String keys in an array of Strings.
 */
public String[] getKeys() {
  return keySet().toArray(new String[size()]);
}
origin: quartz-scheduler/quartz

/**
 * Determine whether any values in this Map do not implement 
 * <code>Serializable</code>.  Always returns false if this Map
 * is flagged to not allow transient data.
 * 
 * @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.
 */
public boolean containsTransientData() {
  if (!getAllowsTransientData()) { // short circuit...
    return false;
  }

  String[] keys = getKeys();
  for (int i = 0; i < keys.length; i++) {
    Object o = super.get(keys[i]);
    if (!(o instanceof Serializable)) {
      return true;
    }
  }

  return false;
}
origin: quartz-scheduler/quartz

@Override
public int hashCode()
{
  return getWrappedMap().hashCode();
}

origin: quartz-scheduler/quartz

/**
 * <p>
 * Adds the given <code>Integer</code> value as a string version to the
 * <code>Job</code>'s data map.
 * </p>
 */
public void putAsString(String key, Integer value) {
  String strValue = value.toString();
  super.put(key, strValue);
}
origin: quartz-scheduler/quartz

/**
 * Removes any data values in the map that are non-Serializable.  Does 
 * nothing if this Map does not allow transient data.
 * 
 * @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.
 */
public void removeTransientData() {
  if (!getAllowsTransientData()) { // short circuit...
    return;
  }

  String[] keys = getKeys();
  for (int i = 0; i < keys.length; i++) {
    Object o = super.get(keys[i]);
    if (!(o instanceof Serializable)) {
      remove(keys[i]);
    }
  }
}
origin: quartz-scheduler/quartz

  /**
   * <p>
   * Retrieve the identified <code>String</code> value from the <code>StringKeyDirtyFlagMap</code>.
   * </p>
   * 
   * @throws ClassCastException
   *           if the identified object is not a String.
   */
  public String getString(String key) {
    Object obj = get(key);
  
    try {
      return (String) obj;
    } catch (Exception e) {
      throw new ClassCastException("Identified object is not a String.");
    }
  }
}
origin: com.opensymphony.quartz/com.springsource.org.quartz

/**
 * Get a copy of the Map's String keys in an array of Strings.
 */
public String[] getKeys() {
  return (String[]) keySet().toArray(new String[size()]);
}
origin: com.opensymphony.quartz/com.springsource.org.quartz

/**
 * Determine whether any values in this Map do not implement 
 * <code>Serializable</code>.  Always returns false if this Map
 * is flagged to not allow transient data.
 * 
 * @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.
 */
public boolean containsTransientData() {
  if (!getAllowsTransientData()) { // short circuit...
    return false;
  }

  String[] keys = getKeys();
  for (int i = 0; i < keys.length; i++) {
    Object o = super.get(keys[i]);
    if (!(o instanceof Serializable)) {
      return true;
    }
  }

  return false;
}
origin: quartz-scheduler/quartz

/**
 * Tell the <code>StringKeyDirtyFlagMap</code> that it should
 * allow non-<code>Serializable</code> values.  Enforces that the Map 
 * doesn't already include transient data.
 * 
 * @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.
 */
public void setAllowsTransientData(boolean allowsTransientData) {

  if (containsTransientData() && !allowsTransientData) {
    throw new IllegalStateException(
      "Cannot set property 'allowsTransientData' to 'false' "
        + "when data map contains non-serializable objects.");
  }

  this.allowsTransientData = allowsTransientData;
}
origin: quartz-scheduler/quartz

/**
 * <p>
 * Adds the given <code>float</code> value as a string version to the
 * <code>Job</code>'s data map.
 * </p>
 */
public void putAsString(String key, float value) {
  String strValue = Float.toString(value);
  super.put(key, strValue);
}
origin: com.opensymphony.quartz/com.springsource.org.quartz

/**
 * Removes any data values in the map that are non-Serializable.  Does 
 * nothing if this Map does not allow transient data.
 * 
 * @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.
 */
public void removeTransientData() {
  if (!getAllowsTransientData()) { // short circuit...
    return;
  }

  String[] keys = getKeys();
  for (int i = 0; i < keys.length; i++) {
    Object o = super.get(keys[i]);
    if (!(o instanceof Serializable)) {
      remove(keys[i]);
    }
  }
}

origin: quartz-scheduler/quartz

/**
 * <p>
 * Retrieve the identified <code>float</code> value from the <code>StringKeyDirtyFlagMap</code>.
 * </p>
 * 
 * @throws ClassCastException
 *           if the identified object is not a Float.
 */
public float getFloat(String key) {
  Object obj = get(key);

  try {
    if(obj instanceof Float)
      return ((Float) obj).floatValue();
    return Float.parseFloat((String)obj);
  } catch (Exception e) {
    throw new ClassCastException("Identified object is not a Float.");
  }
}
org.quartz.utilsStringKeyDirtyFlagMap

Javadoc

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.

Most used methods

  • containsTransientData
    Determine whether any values in this Map do not implementSerializable. Always returns false if this
  • get
  • getAllowsTransientData
    Whether the StringKeyDirtyFlagMap allows non-Serializable values.
  • getKeys
    Get a copy of the Map's String keys in an array of Strings.
  • keySet
  • put
    Adds the given boolean value to the StringKeyDirtyFlagMap.
  • remove
  • size
  • getWrappedMap

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JOptionPane (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now