use of org.infinispan.remoting.transport.impl.RequestRepository in project infinispan by infinispan.
the class JGroupsTransport method start.
@Start
@Override
public void start() {
if (running)
throw new IllegalStateException("Two or more cache managers are using the same JGroupsTransport instance");
probeHandler.updateThreadPool(nonBlockingExecutor);
props = TypedProperties.toTypedProperties(configuration.transport().properties());
requests = new RequestRepository();
String stack = configuration.transport().stack();
if (stack != null) {
CLUSTER.startingJGroupsChannel(configuration.transport().clusterName(), configuration.transport().stack());
} else {
CLUSTER.startingJGroupsChannel(configuration.transport().clusterName());
}
initChannel();
channel.setUpHandler(channelCallbacks);
setXSiteViewListener(channelCallbacks);
startJGroupsChannelIfNeeded();
waitForInitialNodes();
channel.getProtocolStack().getTransport().registerProbeHandler(probeHandler);
RELAY2 relay2 = findRelay2();
if (relay2 != null) {
localSite = XSiteNamedCache.cachedString(relay2.site());
}
running = true;
}
use of org.infinispan.remoting.transport.impl.RequestRepository in project infinispan by infinispan.
the class CountingRequestRepository method replaceDispatcher.
public static CountingRequestRepository replaceDispatcher(EmbeddedCacheManager cacheManager) {
GlobalComponentRegistry gcr = cacheManager.getGlobalComponentRegistry();
JGroupsTransport transport = (JGroupsTransport) gcr.getComponent(Transport.class);
RequestRepository requestRepository = (RequestRepository) TestingUtil.extractField(JGroupsTransport.class, transport, "requests");
CountingRequestRepository instance = new CountingRequestRepository(requestRepository);
TestingUtil.replaceField(instance, "requests", transport, JGroupsTransport.class);
return instance;
}
Aggregations