Package org.infinispan.xsite.statetransfer

Examples of org.infinispan.xsite.statetransfer.XSiteProviderDelegator


         log.debugf("Discard x-site state transfer start command in cache %s to remove", addressOf(cache(LON, testCaches.removeIndex)));
         wrapComponent(cache(LON, testCaches.removeIndex), XSiteStateProvider.class,
                       new WrapFactory<XSiteStateProvider, XSiteStateProvider, Cache<?, ?>>() {
                          @Override
                          public XSiteStateProvider wrap(Cache<?, ?> wrapOn, XSiteStateProvider current) {
                             return new XSiteProviderDelegator(current) {
                                @Override
                                public void startStateTransfer(String siteName, Address requestor, int minTopologyId) {
                                   log.debugf("Discard state transfer request to %s from %s", siteName, requestor);
                                   //no-op, i.e. discard it!
                                }
                             };
                          }
                       }, true);
      } else {
         log.debugf("Block x-site state transfer start command in cache %s", addressOf(cache(LON, 1)));
         wrapComponent(cache(LON, 1), XSiteStateProvider.class,
                       new WrapFactory<XSiteStateProvider, XSiteStateProvider, Cache<?, ?>>() {

                          @Override
                          public XSiteStateProvider wrap(Cache<?, ?> wrapOn, XSiteStateProvider current) {
                             return new XSiteProviderDelegator(current) {
                                @Override
                                public void startStateTransfer(String siteName, Address requestor, int minTopologyId) {
                                   log.debugf("Blocking state transfer request to %s from %s", siteName, requestor);
                                   pendingRequest.set(new StateTransferRequest(siteName, requestor, minTopologyId, xSiteStateProvider));
                                }
View Full Code Here

TOP

Related Classes of org.infinispan.xsite.statetransfer.XSiteProviderDelegator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.