Search in sources :

Example 1 with TestSubscriberContext

use of com.hazelcast.map.impl.querycache.subscriber.TestSubscriberContext in project hazelcast by hazelcast.

the class QueryCacheRecoveryUponEventLossTest method setTestSequencer.

private void setTestSequencer(HazelcastInstance instance, int eventCount) {
    Node node = getNode(instance);
    MapService service = node.getNodeEngine().getService(MapService.SERVICE_NAME);
    MapServiceContext mapServiceContext = service.getMapServiceContext();
    QueryCacheContext queryCacheContext = mapServiceContext.getQueryCacheContext();
    queryCacheContext.setSubscriberContext(new TestSubscriberContext(queryCacheContext, eventCount, true));
}
Also used : TestSubscriberContext(com.hazelcast.map.impl.querycache.subscriber.TestSubscriberContext) Node(com.hazelcast.instance.Node) MapService(com.hazelcast.map.impl.MapService) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Example 2 with TestSubscriberContext

use of com.hazelcast.map.impl.querycache.subscriber.TestSubscriberContext in project hazelcast by hazelcast.

the class QueryCacheEventLostListenerTest method setTestSequencer.

private void setTestSequencer(HazelcastInstance instance, int eventCount) {
    Node node = getNode(instance);
    MapService service = node.getNodeEngine().getService(MapService.SERVICE_NAME);
    MapServiceContext mapServiceContext = service.getMapServiceContext();
    QueryCacheContext queryCacheContext = mapServiceContext.getQueryCacheContext();
    queryCacheContext.setSubscriberContext(new TestSubscriberContext(queryCacheContext, eventCount, true));
}
Also used : TestSubscriberContext(com.hazelcast.map.impl.querycache.subscriber.TestSubscriberContext) Accessors.getNode(com.hazelcast.test.Accessors.getNode) Node(com.hazelcast.instance.impl.Node) MapService(com.hazelcast.map.impl.MapService) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Aggregations

MapService (com.hazelcast.map.impl.MapService)2 MapServiceContext (com.hazelcast.map.impl.MapServiceContext)2 TestSubscriberContext (com.hazelcast.map.impl.querycache.subscriber.TestSubscriberContext)2 Node (com.hazelcast.instance.Node)1 Node (com.hazelcast.instance.impl.Node)1 Accessors.getNode (com.hazelcast.test.Accessors.getNode)1