/** * Sets CQ routing information. * @param member for which CQs are satisfied. * @param cqInfo map of server side CQ Name to CQ event type. */ public void setCqRoutingInfo(InternalDistributedMember member, HashMap cqInfo) { FilterInfo fInfo = new FilterInfo(); fInfo.setCQs(cqInfo); this.serverFilterInfo.put(member, fInfo); if (cqInfo.size() > 0) { this.memberWithFilterInfoExists = true; } }
/** * Sets CQ routing information. * @param member for which CQs are satisfied. * @param cqInfo map of server side CQ Name to CQ event type. */ public void setCqRoutingInfo(InternalDistributedMember member, HashMap cqInfo) { FilterInfo fInfo = new FilterInfo(); fInfo.setCQs(cqInfo); this.serverFilterInfo.put(member, fInfo); if (cqInfo.size() > 0) { this.memberWithFilterInfoExists = true; } }
/** * This adds the filter information from the given routing object to this * object's tables. This is used to merge routing information for putAll * operations. * @param eventRouting the routing information for a single putAll event */ public void addFilterInfo(FilterRoutingInfo eventRouting) { for (Map.Entry<InternalDistributedMember, FilterInfo> entry: eventRouting.serverFilterInfo.entrySet()) { FilterInfo existing = this.serverFilterInfo.get(entry.getKey()); if (existing == null) { existing = new FilterInfo(); this.serverFilterInfo.put(entry.getKey(), existing); } existing.addFilterInfo(entry.getValue()); } if (eventRouting.localFilterInfo != null) { if (this.localFilterInfo == null) { this.localFilterInfo = new FilterInfo(); } this.localFilterInfo.addFilterInfo(eventRouting.localFilterInfo); } this.memberWithFilterInfoExists |= eventRouting.memberWithFilterInfoExists; }
fi = new FilterInfo();
fi = new FilterInfo();
fi = new FilterInfo();
/** * Sets interested clients routing information * @param member on which the client interests are satisfied * @param clients Set containing interested clients with receiveValues=true * @param clientsInv Set containing interested clients with receiveValues=false * @param longIDs whether the client IDs may be long integers */ public void addInterestedClients(InternalDistributedMember member, Set clients, Set clientsInv, boolean longIDs) { this.memberWithFilterInfoExists = true; FilterInfo fInfo = this.serverFilterInfo.get(member); if (fInfo == null){ fInfo = new FilterInfo(); this.serverFilterInfo.put(member, fInfo); } if (clients != null && clients.size() > 0) { fInfo.setInterestedClients(clients); } if (clientsInv != null && clientsInv.size() > 0) { fInfo.setInterestedClientsInv(clientsInv); } if (longIDs) { fInfo.longIDs = longIDs; } }
/** * Sets interested clients routing information * @param member on which the client interests are satisfied * @param clients Set containing interested clients with receiveValues=true * @param clientsInv Set containing interested clients with receiveValues=false * @param longIDs whether the client IDs may be long integers */ public void addInterestedClients(InternalDistributedMember member, Set clients, Set clientsInv, boolean longIDs) { this.memberWithFilterInfoExists = true; FilterInfo fInfo = this.serverFilterInfo.get(member); if (fInfo == null){ fInfo = new FilterInfo(); this.serverFilterInfo.put(member, fInfo); } if (clients != null && clients.size() > 0) { fInfo.setInterestedClients(clients); } if (clientsInv != null && clientsInv.size() > 0) { fInfo.setInterestedClientsInv(clientsInv); } if (longIDs) { fInfo.longIDs = longIDs; } }
/** * This adds the filter information from the given routing object to this * object's tables. This is used to merge routing information for putAll * operations. * @param eventRouting the routing information for a single putAll event */ public void addFilterInfo(FilterRoutingInfo eventRouting) { for (Map.Entry<InternalDistributedMember, FilterInfo> entry: eventRouting.serverFilterInfo.entrySet()) { FilterInfo existing = this.serverFilterInfo.get(entry.getKey()); if (existing == null) { existing = new FilterInfo(); this.serverFilterInfo.put(entry.getKey(), existing); } existing.addFilterInfo(entry.getValue()); } if (eventRouting.localFilterInfo != null) { if (this.localFilterInfo == null) { this.localFilterInfo = new FilterInfo(); } this.localFilterInfo.addFilterInfo(eventRouting.localFilterInfo); } this.memberWithFilterInfoExists |= eventRouting.memberWithFilterInfoExists; }
/** DataSerializable methods */ public void fromData(DataInput in) throws IOException, ClassNotFoundException { DistributedMember myID = null; GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache != null) { myID = cache.getMyId(); } int size = in.readInt(); for (int i=0; i < size; i++){ InternalDistributedMember member = InternalDistributedMember.readEssentialData(in); FilterInfo fInfo = new FilterInfo(); InternalDataSerializer.invokeFromData(fInfo, in); // we only need to retain the recipient's entry if (myID == null || myID.equals(member)) { this.serverFilterInfo.put(member, fInfo); } } }
/** DataSerializable methods */ public void fromData(DataInput in) throws IOException, ClassNotFoundException { DistributedMember myID = null; GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache != null) { myID = cache.getMyId(); } int size = in.readInt(); for (int i=0; i < size; i++){ InternalDistributedMember member = InternalDistributedMember.readEssentialData(in); FilterInfo fInfo = new FilterInfo(); InternalDataSerializer.invokeFromData(fInfo, in); // we only need to retain the recipient's entry if (myID == null || myID.equals(member)) { this.serverFilterInfo.put(member, fInfo); } } }
public void fromDataPre_GFE_7_1_0_0(DataInput in) throws IOException, ClassNotFoundException { DistributedMember myID = null; GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache != null) { myID = cache.getMyId(); } int size = in.readInt(); for (int i=0; i < size; i++){ InternalDistributedMember member = new InternalDistributedMember(); InternalDataSerializer.invokeFromData(member, in); FilterInfo fInfo = new FilterInfo(); InternalDataSerializer.invokeFromData(fInfo, in); // we only need to retain the recipient's entry if (myID == null || myID.equals(member)) { this.serverFilterInfo.put(member, fInfo); } } }
/** * Sets the local Interest information. * @param clients interested clients with receiveValues=true. * @param clientsInv interested clients with receiveValues=false; */ public void setLocalInterestedClients(Set clients, Set clientsInv){ if (this.localFilterInfo == null) { this.localFilterInfo = new FilterInfo(); } this.localFilterInfo.setInterestedClients(clients); this.localFilterInfo.setInterestedClientsInv(clientsInv); this.localFilterInfo.filterProcessedLocally = true; this.hasLocalInterestBeenComputed = true; }
/** * Sets the local Interest information. * @param clients interested clients with receiveValues=true. * @param clientsInv interested clients with receiveValues=false; */ public void setLocalInterestedClients(Set clients, Set clientsInv){ if (this.localFilterInfo == null) { this.localFilterInfo = new FilterInfo(); } this.localFilterInfo.setInterestedClients(clients); this.localFilterInfo.setInterestedClientsInv(clientsInv); this.localFilterInfo.filterProcessedLocally = true; this.hasLocalInterestBeenComputed = true; }
/** * Sets the local CQ filter information. * @param cqInfo map of server side CQ Name to CQ event type. */ public void setLocalCqInfo(HashMap cqInfo){ if (this.localFilterInfo == null) { this.localFilterInfo = new FilterInfo(); } this.localFilterInfo.cqs = cqInfo; this.localFilterInfo.filterProcessedLocally = true; }
/** * Sets the local CQ filter information. * @param cqInfo map of server side CQ Name to CQ event type. */ public void setLocalCqInfo(HashMap cqInfo){ if (this.localFilterInfo == null) { this.localFilterInfo = new FilterInfo(); } this.localFilterInfo.cqs = cqInfo; this.localFilterInfo.filterProcessedLocally = true; }