Class TaskStateMap

java.lang.Object
java.util.AbstractMap<K,V>
java.util.TreeMap<Integer,org.jppf.node.protocol.TaskState>
org.jppf.client.balancer.TaskStateMap
All Implemented Interfaces:
Serializable, Cloneable, Map<Integer,org.jppf.node.protocol.TaskState>, NavigableMap<Integer,org.jppf.node.protocol.TaskState>, SortedMap<Integer,org.jppf.node.protocol.TaskState>

public class TaskStateMap extends TreeMap<Integer,org.jppf.node.protocol.TaskState>
This map counts the number of each enum value that is put as a map value.
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • TaskStateMap

      public TaskStateMap()
      Initialize this map.
  • Method Details

    • put

      public org.jppf.node.protocol.TaskState put(Integer key, org.jppf.node.protocol.TaskState state)
      Specified by:
      put in interface Map<Integer,org.jppf.node.protocol.TaskState>
      Overrides:
      put in class TreeMap<Integer,org.jppf.node.protocol.TaskState>
    • remove

      public org.jppf.node.protocol.TaskState remove(Object key)
      Specified by:
      remove in interface Map<Integer,org.jppf.node.protocol.TaskState>
      Overrides:
      remove in class TreeMap<Integer,org.jppf.node.protocol.TaskState>
    • getStateCount

      public int getStateCount(org.jppf.node.protocol.TaskState state)
      Get the number of tasks in the specified state.
      Parameters:
      state - the state for which to get a count.
      Returns:
      the number of tasks that have this state.
    • clear

      public void clear()
      Specified by:
      clear in interface Map<Integer,org.jppf.node.protocol.TaskState>
      Overrides:
      clear in class TreeMap<Integer,org.jppf.node.protocol.TaskState>