コード例 #1
0
  protected PrepareCommandBlocker addPrepareBlockerIfAbsent(Cache<?, ?> cache) {
    AsyncInterceptorChain chain = cache.getAdvancedCache().getAsyncInterceptorChain();

    PrepareCommandBlocker blocker = chain.findInterceptorWithClass(PrepareCommandBlocker.class);
    if (blocker != null) return blocker;

    blocker = new PrepareCommandBlocker();
    chain.addInterceptorBefore(blocker, TxInterceptor.class);
    return blocker;
  }