use of org.apache.ignite.internal.processors.cache.ExchangeActions.CacheActionData in project ignite by apache.
the class CacheBlockOnReadAbstractTest method createCachePredicate.
/**
* Checks that given discovery event is from "Create cache" operation.
*
* @param discoEvt Discovery event.
*/
private static boolean createCachePredicate(DiscoveryEvent discoEvt) {
if (discoEvt instanceof DiscoveryCustomEvent) {
DiscoveryCustomEvent discoCustomEvt = (DiscoveryCustomEvent) discoEvt;
DiscoveryCustomMessage customMsg = discoCustomEvt.customMessage();
if (customMsg instanceof DynamicCacheChangeBatch) {
DynamicCacheChangeBatch cacheChangeBatch = (DynamicCacheChangeBatch) customMsg;
ExchangeActions exchangeActions = U.field(cacheChangeBatch, "exchangeActions");
Collection<CacheActionData> startRequests = exchangeActions.cacheStartRequests();
return !startRequests.isEmpty();
}
}
return false;
}
use of org.apache.ignite.internal.processors.cache.ExchangeActions.CacheActionData in project ignite by apache.
the class CacheBlockOnReadAbstractTest method destroyCachePredicate.
/**
* Checks that given discovery event is from "Destroy cache" operation.
*
* @param discoEvt Discovery event.
*/
private static boolean destroyCachePredicate(DiscoveryEvent discoEvt) {
if (discoEvt instanceof DiscoveryCustomEvent) {
DiscoveryCustomEvent discoCustomEvt = (DiscoveryCustomEvent) discoEvt;
DiscoveryCustomMessage customMsg = discoCustomEvt.customMessage();
if (customMsg instanceof DynamicCacheChangeBatch) {
DynamicCacheChangeBatch cacheChangeBatch = (DynamicCacheChangeBatch) customMsg;
ExchangeActions exchangeActions = U.field(cacheChangeBatch, "exchangeActions");
Collection<CacheActionData> stopRequests = exchangeActions.cacheStopRequests();
return !stopRequests.isEmpty();
}
}
return false;
}
Aggregations