Search in sources :

Example 6 with Invalidation

use of com.hazelcast.internal.nearcache.impl.invalidation.Invalidation in project hazelcast by hazelcast.

the class InvalidationTest method testBatchDeserialization.

@Test
public void testBatchDeserialization() {
    Data serializedInvalidation = serializationService.toData(batchInvalidation);
    BatchNearCacheInvalidation deserializedInvalidation = serializationService.toObject(serializedInvalidation);
    assertInvalidation(batchInvalidation, deserializedInvalidation, false);
    assertEquals(batchInvalidation.getInvalidations().size(), deserializedInvalidation.getInvalidations().size());
    for (Invalidation invalidation : deserializedInvalidation.getInvalidations()) {
        assertInvalidation(singleInvalidation, invalidation, true);
    }
}
Also used : BatchNearCacheInvalidation(com.hazelcast.internal.nearcache.impl.invalidation.BatchNearCacheInvalidation) Data(com.hazelcast.internal.serialization.Data) BatchNearCacheInvalidation(com.hazelcast.internal.nearcache.impl.invalidation.BatchNearCacheInvalidation) SingleNearCacheInvalidation(com.hazelcast.internal.nearcache.impl.invalidation.SingleNearCacheInvalidation) Invalidation(com.hazelcast.internal.nearcache.impl.invalidation.Invalidation) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

Invalidation (com.hazelcast.internal.nearcache.impl.invalidation.Invalidation)6 BatchNearCacheInvalidation (com.hazelcast.internal.nearcache.impl.invalidation.BatchNearCacheInvalidation)4 SingleNearCacheInvalidation (com.hazelcast.internal.nearcache.impl.invalidation.SingleNearCacheInvalidation)4 QuickTest (com.hazelcast.test.annotation.QuickTest)4 Test (org.junit.Test)4 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)3 CacheConfig (com.hazelcast.config.CacheConfig)2 Data (com.hazelcast.internal.serialization.Data)2 Data (com.hazelcast.nio.serialization.Data)2 UUID (java.util.UUID)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 CacheEventListener (com.hazelcast.cache.impl.CacheEventListener)1 Config (com.hazelcast.config.Config)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 NearCacheTestUtils.getBaseConfig (com.hazelcast.internal.nearcache.impl.NearCacheTestUtils.getBaseConfig)1 AssertTask (com.hazelcast.test.AssertTask)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1