@Setup public void setup(TestContext testContext) { HazelcastInstance hazelcastInstance = testContext.getTargetInstance(); results = hazelcastInstance.getList(basename); listeners = hazelcastInstance.getList(basename + "listeners"); cache = CacheUtils.getCache(hazelcastInstance, basename); listener = new ICacheEntryListener<Integer, Long>(); filter = new ICacheEntryEventFilter<Integer, Long>(); CacheEntryListenerConfiguration<Integer, Long> config = new MutableCacheEntryListenerConfiguration<Integer, Long>( FactoryBuilder.factoryOf(listener), FactoryBuilder.factoryOf(filter), false, syncEvents); cache.registerCacheEntryListener(config); builder .addOperation(Operation.PUT, put) .addOperation(Operation.PUT_EXPIRY, putExpiry) .addOperation(Operation.PUT_EXPIRY_ASYNC, putAsyncExpiry) .addOperation(Operation.GET_EXPIRY, getExpiry) .addOperation(Operation.GET_EXPIRY_ASYNC, getAsyncExpiry) .addOperation(Operation.REMOVE, remove) .addOperation(Operation.REPLACE, replace); }
@Setup public void setUp(TestContext testContext) { map = testContext.getTargetInstance().getMap(basename); operationSelectorBuilder .addOperation(Operation.PUT, putProbability) .addDefaultOperation(Operation.QUERY); }
@Setup public void setUp(TestContext testContext) { hazelcastInstance = testContext.getTargetInstance(); HazelcastInstance targetInstance = testContext.getTargetInstance(); map = targetInstance.getDistributedObject(SyntheticMapService.SERVICE_NAME, "map-" + basename); operationSelectorBuilder .addOperation(Operation.PUT, putProb) .addDefaultOperation(Operation.GET); }
@Setup public void setUp(TestContext testContext) throws Exception { HazelcastInstance targetInstance = testContext.getTargetInstance(); map = targetInstance.getMap(basename); operationCounterList = targetInstance.getList(basename + "OperationCounter"); operationSelectorBuilder .addOperation(Operation.PREDICATE_BUILDER, predicateBuilderProb) .addOperation(Operation.SQL_STRING, sqlStringProb) .addOperation(Operation.PAGING_PREDICATE, pagePredicateProb) .addOperation(Operation.UPDATE_EMPLOYEE, updateEmployeeProb) .addOperation(Operation.DESTROY_MAP, destroyProb); }