Search in sources :

Example 6 with CacheClearResponse

use of com.hazelcast.cache.impl.CacheClearResponse in project hazelcast by hazelcast.

the class CacheRemoveAllMessageTask method reduce.

@Override
protected Object reduce(Map<Integer, Object> map) {
    for (Map.Entry<Integer, Object> entry : map.entrySet()) {
        if (entry.getValue() == null) {
            continue;
        }
        final CacheClearResponse cacheClearResponse = (CacheClearResponse) nodeEngine.toObject(entry.getValue());
        final Object response = cacheClearResponse.getResponse();
        if (response instanceof CacheException) {
            throw (CacheException) response;
        }
    }
    return null;
}
Also used : CacheClearResponse(com.hazelcast.cache.impl.CacheClearResponse) CacheException(javax.cache.CacheException) Map(java.util.Map)

Aggregations

CacheClearResponse (com.hazelcast.cache.impl.CacheClearResponse)6 CacheException (javax.cache.CacheException)6 Map (java.util.Map)4 ICacheService (com.hazelcast.cache.impl.ICacheService)1 CacheRecord (com.hazelcast.cache.impl.record.CacheRecord)1 Data (com.hazelcast.nio.serialization.Data)1 IPartitionService (com.hazelcast.spi.partition.IPartitionService)1