Search in sources :

Example 1 with ClientTombstoneMessage

use of org.apache.geode.internal.cache.tier.sockets.ClientTombstoneMessage in project geode by apache.

the class HAGIIDUnitTest method tombstonegc.

/** queue a tombstone GC message for the client. See bug #46832 */
public static void tombstonegc() throws Exception {
    LocalRegion r = (LocalRegion) cache.getRegion("/" + REGION_NAME);
    assertNotNull(r);
    DistributedMember id = r.getCache().getDistributedSystem().getDistributedMember();
    RegionEventImpl regionEvent = new RegionEventImpl(r, Operation.REGION_DESTROY, null, true, id);
    FilterInfo clientRouting = r.getFilterProfile().getLocalFilterRouting(regionEvent);
    assertTrue(clientRouting.getInterestedClients().size() > 0);
    regionEvent.setLocalFilterInfo(clientRouting);
    Map<VersionSource, Long> map = Collections.emptyMap();
    ClientTombstoneMessage message = ClientTombstoneMessage.gc(r, map, new EventID(r.getCache().getDistributedSystem()));
    CacheClientNotifier.notifyClients(regionEvent, message);
}
Also used : VersionSource(org.apache.geode.internal.cache.versions.VersionSource) ClientTombstoneMessage(org.apache.geode.internal.cache.tier.sockets.ClientTombstoneMessage) RegionEventImpl(org.apache.geode.internal.cache.RegionEventImpl) DistributedMember(org.apache.geode.distributed.DistributedMember) EventID(org.apache.geode.internal.cache.EventID) LocalRegion(org.apache.geode.internal.cache.LocalRegion) FilterInfo(org.apache.geode.internal.cache.FilterRoutingInfo.FilterInfo)

Aggregations

DistributedMember (org.apache.geode.distributed.DistributedMember)1 EventID (org.apache.geode.internal.cache.EventID)1 FilterInfo (org.apache.geode.internal.cache.FilterRoutingInfo.FilterInfo)1 LocalRegion (org.apache.geode.internal.cache.LocalRegion)1 RegionEventImpl (org.apache.geode.internal.cache.RegionEventImpl)1 ClientTombstoneMessage (org.apache.geode.internal.cache.tier.sockets.ClientTombstoneMessage)1 VersionSource (org.apache.geode.internal.cache.versions.VersionSource)1