use of org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl in project ignite by apache.
the class GridAffinityNoCacheSelfTest method checkAffinityImplCacheDeleted.
/**
* @param key Key.
*/
private void checkAffinityImplCacheDeleted(Object key) throws InterruptedException {
IgniteEx grid = grid(0);
final String cacheName = "cacheToBeDeleted";
grid(1).getOrCreateCache(cacheName);
awaitPartitionMapExchange();
Affinity<Object> affinity = grid.affinity(cacheName);
assertTrue(affinity instanceof GridCacheAffinityImpl);
final ClusterNode n = grid.cluster().localNode();
grid.cache(cacheName).destroy();
awaitPartitionMapExchange();
assertAffinityMethodsException(grid.affinity(cacheName), key, n);
}
use of org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl in project ignite by apache.
the class GridAffinityNoCacheSelfTest method checkAffinityProxyNoCache.
/**
* @param key Key.
*/
private void checkAffinityProxyNoCache(Object key) {
IgniteEx ignite = grid(0);
final Affinity<Object> affinity = ignite.affinity("noCache");
assertFalse("Affinity proxy instance expected", affinity instanceof GridCacheAffinityImpl);
final ClusterNode n = ignite.cluster().localNode();
assertAffinityMethodsException(affinity, key, n);
}
Aggregations