コード例 #1
0
 /**
  * Subtracts the probes in the given {@link ExecutionData} object from the store. I.e. for all set
  * probes in the given data object the corresponding probes in this store will be unset. If there
  * is no execution data with id of the given data object this operation will have no effect.
  *
  * @param data execution data to subtract
  * @throws IllegalStateException if the given {@link ExecutionData} object is not compatible to a
  *     corresponding one, that is already contained
  * @see ExecutionData#assertCompatibility(long, String, int)
  */
 public void subtract(final ExecutionData data) throws IllegalStateException {
   final Long id = Long.valueOf(data.getId());
   final ExecutionData entry = entries.get(id);
   if (entry != null) {
     entry.merge(data, false);
   }
 }
コード例 #2
0
 /**
  * Adds the given {@link ExecutionData} object into the store. If there is already execution data
  * with this same class id, this structure is merged with the given one.
  *
  * @param data execution data to add or merge
  * @throws IllegalStateException if the given {@link ExecutionData} object is not compatible to a
  *     corresponding one, that is already contained
  * @see ExecutionData#assertCompatibility(long, String, int)
  */
 public void put(final ExecutionData data) throws IllegalStateException {
   final Long id = Long.valueOf(data.getId());
   final ExecutionData entry = entries.get(id);
   if (entry == null) {
     entries.put(id, data);
     names.add(data.getName());
   } else {
     entry.merge(data);
   }
 }