public static void replicateCommand(Cache cache, VisitableCommand command) throws Throwable {
ComponentRegistry cr = extractComponentRegistry(cache);
InterceptorChain ic = cr.getComponent(InterceptorChain.class);
InvocationContextContainer icc = cr.getComponent(InvocationContextContainer.class);
InvocationContext ctxt = icc.createInvocationContext(true, -1);
ic.invoke(ctxt, command);
}
public static void blockUntilViewsReceived(int timeout, Collection caches) {
Object first = caches.iterator().next();
if (first instanceof Cache) {