コード例 #1
0
 /**
  * set the error mode annotation.
  *
  * @param id record id
  * @param errorMode error mode
  * @throws BlackboardAccessException error on blackboard.
  */
 private void setErrorModeAnnotation(final Id id, final ErrorMode errorMode)
     throws BlackboardAccessException {
   final Annotation anno = getBlackboard().createAnnotation(id);
   anno.setNamedValue(ErrorPipelet.NAME_MODE, errorMode.name());
   getBlackboard().setAnnotation(id, null, ErrorPipelet.class.getName(), anno);
 }
コード例 #2
0
 /**
  * set runtime value in result annotation.
  *
  * @param blackboard blackboard
  * @param record query record id
  * @param runtime runtime value in nanoseconds.
  * @throws BlackboardAccessException error accessing blackboard.
  */
 private void setRuntime(final Blackboard blackboard, final Id record, final long runtime)
     throws BlackboardAccessException {
   final long msRuntime = (runtime / NANO_TO_MILLIS);
   final Annotation resultAnno = ensureResultAnnotation(blackboard, record);
   resultAnno.setNamedValue(SearchAnnotations.RUNTIME, Long.toString(msRuntime));
 }