Esempio n. 1
0
  /** {@inheritDoc} */
  @SuppressWarnings("deprecation")
  @Override
  protected GridConfiguration getConfiguration(String gridName) throws Exception {
    GridConfiguration cfg = super.getConfiguration(gridName);

    cfg.setNodeId(null);

    cfg.setFailoverSpi(
        new GridAlwaysFailoverSpi() {
          /** {@inheritDoc} */
          @Override
          public GridNode failover(GridFailoverContext ctx, List<GridNode> top) {
            failCnt.incrementAndGet();

            return super.failover(ctx, top);
          }
        });

    return cfg;
  }