use of com.hazelcast.internal.nearcache.impl.invalidation.RepairingHandler in project hazelcast by hazelcast.
the class MemberMapMetaDataFetcherTest method fetches_sequence_and_uuid.
@Test
public void fetches_sequence_and_uuid() throws Exception {
String mapName = "test";
int partition = 1;
long givenSequence = getInt(1, Integer.MAX_VALUE);
UUID givenUuid = UuidUtil.newSecureUUID();
RepairingTask repairingTask = getRepairingTask(mapName, partition, givenSequence, givenUuid);
MetaDataFetcher metaDataFetcher = repairingTask.getMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
metaDataFetcher.fetchMetadata(handlers);
RepairingHandler repairingHandler = handlers.get(mapName);
MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
assertEquals(givenSequence, foundSequence);
assertEquals(givenUuid, foundUuid);
}
use of com.hazelcast.internal.nearcache.impl.invalidation.RepairingHandler in project hazelcast by hazelcast.
the class ClientCacheMetaDataFetcherTest method fetches_sequence_and_uuid.
@Test
public void fetches_sequence_and_uuid() throws Exception {
String cacheName = "test";
int partition = 1;
long givenSequence = getInt(1, MAX_VALUE);
UUID givenUuid = UuidUtil.newSecureUUID();
RepairingTask repairingTask = getRepairingTask(cacheName, partition, givenSequence, givenUuid);
MetaDataFetcher metaDataFetcher = repairingTask.getMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
metaDataFetcher.fetchMetadata(handlers);
RepairingHandler repairingHandler = handlers.get(getPrefixedName(cacheName));
MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
assertEquals(givenSequence, foundSequence);
assertEquals(givenUuid, foundUuid);
}
use of com.hazelcast.internal.nearcache.impl.invalidation.RepairingHandler in project hazelcast by hazelcast.
the class ClientCacheInvalidationMetaDataFetcherTest method fetches_sequence_and_uuid.
@Test
public void fetches_sequence_and_uuid() {
String cacheName = "test";
int partition = 1;
long givenSequence = getInt(1, MAX_VALUE);
UUID givenUuid = UuidUtil.newUnsecureUUID();
RepairingTask repairingTask = getRepairingTask(cacheName, partition, givenSequence, givenUuid);
InvalidationMetaDataFetcher invalidationMetaDataFetcher = repairingTask.getInvalidationMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
invalidationMetaDataFetcher.fetchMetadata(handlers);
RepairingHandler repairingHandler = handlers.get(getPrefixedName(cacheName));
MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
assertEquals(givenSequence, foundSequence);
assertEquals(givenUuid, foundUuid);
}
use of com.hazelcast.internal.nearcache.impl.invalidation.RepairingHandler in project hazelcast by hazelcast.
the class MemberMapInvalidationMetaDataFetcherTest method fetches_sequence_and_uuid.
@Test
public void fetches_sequence_and_uuid() {
String mapName = "test";
int partition = 1;
long givenSequence = getInt(1, Integer.MAX_VALUE);
UUID givenUuid = UuidUtil.newUnsecureUUID();
RepairingTask repairingTask = getRepairingTask(mapName, partition, givenSequence, givenUuid);
InvalidationMetaDataFetcher invalidationMetaDataFetcher = repairingTask.getInvalidationMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
invalidationMetaDataFetcher.fetchMetadata(handlers);
RepairingHandler repairingHandler = handlers.get(mapName);
MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
assertEquals(givenSequence, foundSequence);
assertEquals(givenUuid, foundUuid);
}
use of com.hazelcast.internal.nearcache.impl.invalidation.RepairingHandler in project hazelcast by hazelcast.
the class ClientMapInvalidationMetaDataFetcherTest method fetches_sequence_and_uuid.
@Test
public void fetches_sequence_and_uuid() {
String mapName = "test";
int partition = 1;
long givenSequence = getInt(1, Integer.MAX_VALUE);
UUID givenUuid = UuidUtil.newUnsecureUUID();
RepairingTask repairingTask = getRepairingTask(mapName, partition, givenSequence, givenUuid);
InvalidationMetaDataFetcher invalidationMetaDataFetcher = repairingTask.getInvalidationMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
invalidationMetaDataFetcher.fetchMetadata(handlers);
RepairingHandler repairingHandler = handlers.get(mapName);
MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
assertEquals(givenSequence, foundSequence);
assertEquals(givenUuid, foundUuid);
}
Aggregations