use of com.hazelcast.client.impl.spi.ClientProxy in project hazelcast by hazelcast.
the class ClientMapNearCacheLeakTest method createNearCacheContextBuilder.
private <K, V> NearCacheTestContextBuilder<K, V, Data, String> createNearCacheContextBuilder() {
ClientConfig clientConfig = getClientConfig();
HazelcastClientProxy client = (HazelcastClientProxy) hazelcastFactory.newHazelcastClient(clientConfig);
IMap<K, V> clientMap = client.getMap(DEFAULT_NEAR_CACHE_NAME);
NearCacheManager nearCacheManager = ((ClientMapProxy) clientMap).getContext().getNearCacheManager(clientMap.getServiceName());
NearCache<Data, String> nearCache = nearCacheManager.getNearCache(DEFAULT_NEAR_CACHE_NAME);
ClientContext clientContext = ((ClientProxy) clientMap).getContext();
RepairingTask repairingTask = clientContext.getRepairingTask(MapService.SERVICE_NAME);
return new NearCacheTestContextBuilder<K, V, Data, String>(nearCacheConfig, client.getSerializationService()).setNearCacheInstance(client).setNearCacheAdapter(new IMapDataStructureAdapter<K, V>(clientMap)).setNearCache(nearCache).setNearCacheManager(nearCacheManager).setRepairingTask(repairingTask);
}
use of com.hazelcast.client.impl.spi.ClientProxy in project hazelcast by hazelcast.
the class ProxyEqualityTest method testTwoClientProxiesFromDifferentInstancesAreNotEquals.
@Test
public void testTwoClientProxiesFromDifferentInstancesAreNotEquals() {
ClientProxy ref1 = (ClientProxy) client1ClusterA.getSet(name);
ClientProxy ref2 = (ClientProxy) client1ClusterB.getSet(name);
assertNotEquals(ref1, ref2);
}
use of com.hazelcast.client.impl.spi.ClientProxy in project hazelcast by hazelcast.
the class ClientMapInvalidationMetaDataFetcherTest method getRepairingTask.
private RepairingTask getRepairingTask(String mapName, int partition, long givenSequence, UUID givenUuid) {
Config config = getBaseConfig();
HazelcastInstance member = factory.newHazelcastInstance(config);
distortRandomPartitionSequence(mapName, partition, givenSequence, member);
distortRandomPartitionUuid(partition, givenUuid, member);
ClientConfig clientConfig = new ClientConfig().addNearCacheConfig(new NearCacheConfig(mapName));
HazelcastInstance client = factory.newHazelcastClient(clientConfig);
IMap<Integer, Integer> clientMap = client.getMap(mapName);
ClientContext clientContext = ((ClientProxy) clientMap).getContext();
return clientContext.getRepairingTask(SERVICE_NAME);
}
Aggregations