Exemplo n.º 1
0
 @Override
 public void onNext(final AllocatedEvaluator eval) {
   checkMsgOrder(eval);
   try {
     eval.submitContext(
         ContextConfiguration.CONF
             .set(ContextConfiguration.IDENTIFIER, "FailContext_" + eval.getId())
             .build());
   } catch (final BindException ex) {
     LOG.log(Level.WARNING, "Context configuration error", ex);
     throw new RuntimeException(ex);
   }
 }
Exemplo n.º 2
0
    @Override
    public void onNext(final AllocatedEvaluator eb) {
      try {
        final Configuration contextConfiguration =
            ContextConfiguration.CONF
                .set(ContextConfiguration.IDENTIFIER, "StatePassingContext")
                .build();

        final Configuration serviceConfiguration =
            ServiceConfiguration.CONF.set(ServiceConfiguration.SERVICES, Counter.class).build();

        eb.submitContextAndService(contextConfiguration, serviceConfiguration);
      } catch (final BindException e) {
        throw new RuntimeException(e);
      }
    }