use of org.apache.geode.internal.cache.tier.sockets.ClientUpdateMessage in project geode by apache.
the class HARQueueNewImplDUnitTest method verifyNullValuesInCMR.
public static void verifyNullValuesInCMR(final Integer numOfEntries, final Integer port, String[] keys) {
final Region msgsRegion = cache.getRegion(CacheServerImpl.generateNameForClientMsgsRegion(port.intValue()));
WaitCriterion wc = new WaitCriterion() {
String excuse;
@Override
public boolean done() {
int sz = msgsRegion.size();
return sz == numOfEntries.intValue();
}
@Override
public String description() {
return excuse;
}
};
waitForCriterion(wc, 60 * 1000, 1000, true);
Set entries = msgsRegion.entrySet();
Iterator iter = entries.iterator();
for (; iter.hasNext(); ) {
Region.Entry entry = (Region.Entry) iter.next();
ClientUpdateMessage cum = (ClientUpdateMessage) entry.getValue();
for (int i = 0; i < keys.length; i++) {
logger.fine("cum.key: " + cum.getKeyToConflate());
// assert that the keys are not present in entries set
assertTrue(!keys[i].equals(cum.getKeyToConflate()));
}
}
}
use of org.apache.geode.internal.cache.tier.sockets.ClientUpdateMessage in project geode by apache.
the class HARQueueNewImplDUnitTest method makeValuesOfSomeKeysNullInClientMsgsRegion.
public static void makeValuesOfSomeKeysNullInClientMsgsRegion(Integer port, String[] keys) {
Region msgsRegion = cache.getRegion(CacheServerImpl.generateNameForClientMsgsRegion(port.intValue()));
assertNotNull(msgsRegion);
Set entries = msgsRegion.entrySet();
Iterator iter = entries.iterator();
deletedValues = new Object[keys.length];
while (iter.hasNext()) {
Region.Entry entry = (Region.Entry) iter.next();
ClientUpdateMessage cum = (ClientUpdateMessage) entry.getValue();
for (int i = 0; i < keys.length; i++) {
if (keys[i].equals(cum.getKeyToConflate())) {
logger.fine("HARQueueNewImplDUnit: Removing " + cum.getKeyOfInterest());
deletedValues[i] = msgsRegion.remove(entry.getKey());
}
}
}
}
Aggregations