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; }