/** * @param eventId */ public HAEventWrapper(EventID eventId) { this.eventIdentifier = eventId; this.clientUpdateMessage = new ClientUpdateMessageImpl( EnumListenerEvent.AFTER_CREATE, new ClientProxyMembershipID(), eventId); rcUpdater.set(this, 0); }
/** * @param eventId */ public HAEventWrapper(EventID eventId) { this.eventIdentifier = eventId; this.clientUpdateMessage = new ClientUpdateMessageImpl( EnumListenerEvent.AFTER_CREATE, new ClientProxyMembershipID(), eventId, null); rcUpdater.set(this, 0); }
EventID eid = null; ClientUpdateMessageImpl cui = new ClientUpdateMessageImpl(EnumListenerEvent.AFTER_CREATE, r, key, val, valIsObj, cb, cpmi, eid, getLogWriter().convertToLogWriterI18n()); ClientUpdateMessageImpl cuiCopy = (ClientUpdateMessageImpl) CopyHelper.copy(cui);
public static void createServerCache(Boolean isRegion) throws Exception { new HABug36738DUnitTest("temp").createCache(new Properties()); if (isRegion.booleanValue()) { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEnableConflation(true); factory.setDataPolicy(DataPolicy.REPLICATE); RegionAttributes attrs = factory.createRegionAttributes(); cache.createVMRegion(REGION_NAME, attrs); } AttributesFactory factoryForHARegion = new AttributesFactory(); factoryForHARegion.setMirrorType(MirrorType.KEYS_VALUES); factoryForHARegion.setScope(Scope.DISTRIBUTED_ACK); RegionAttributes ra = factoryForHARegion.createRegionAttributes(); haRegion = HARegion.getInstance(HAREGION_NAME, (GemFireCacheImpl)cache, null, ra); if (isRegion.booleanValue()) { for (int i = 0; i < NO_OF_PUTS; i++) { ClientUpdateMessage clientMessage = new ClientUpdateMessageImpl( EnumListenerEvent.AFTER_UPDATE, (LocalRegion)haRegion, null, ("value" + i) .getBytes(), (byte)0x01, null, new ClientProxyMembershipID(), new EventID(("memberID" + i).getBytes(), i, i), null); haRegion.put(new Long(i), clientMessage); Log.getLogWriter().info("Putting in the message Queue"); } } }
ClientUpdateMessage updateMessage = new ClientUpdateMessageImpl( EnumListenerEvent.AFTER_CREATE, lr, keyOfInterest, value, null, (isObject ? (byte) 0x01 : (byte) 0x00), null, this.proxyID,
this.clientUpdateMessage = new ClientUpdateMessageImpl(); InternalDataSerializer.invokeFromData(this.clientUpdateMessage, in); ((ClientUpdateMessageImpl)this.clientUpdateMessage) InternalDataSerializer.invokeFromData(new ClientUpdateMessageImpl(), in);
/** * Calls toData() on its clientUpdateMessage present in the * haContainer (client-messages-region or the map). * * @param out * The output stream which the object should be written to. */ public void toData(DataOutput out) throws IOException { ClientUpdateMessageImpl cum = (ClientUpdateMessageImpl)this.haContainer .get(this); // If the dispatcher sends the cum object to the client and removes it from // the haContainer before we do haContainer.get() (above), we indicate that // by sending false boolean value. if (cum != null) { DataSerializer.writePrimitiveBoolean(true, out); DataSerializer.writeObject(cum.getEventId(), out); } else { DataSerializer.writePrimitiveBoolean(false, out); DataSerializer.writeObject(new EventID(), out); // Create a dummy ClientUpdateMessageImpl instance cum = new ClientUpdateMessageImpl(EnumListenerEvent.AFTER_CREATE, new ClientProxyMembershipID(), null); } InternalDataSerializer.invokeToData(cum, out); if (cum.hasCqs()) { DataSerializer.writeConcurrentHashMap(cum.getClientCqs(), out); } }
/** * Calls toData() on its clientUpdateMessage present in the * haContainer (client-messages-region or the map). * * @param out * The output stream which the object should be written to. */ public void toData(DataOutput out) throws IOException { ClientUpdateMessageImpl cum = (ClientUpdateMessageImpl)this.haContainer .get(this); // If the dispatcher sends the cum object to the client and removes it from // the haContainer before we do haContainer.get() (above), we indicate that // by sending false boolean value. if (cum != null) { DataSerializer.writePrimitiveBoolean(true, out); DataSerializer.writeObject(cum.getEventId(), out); } else { DataSerializer.writePrimitiveBoolean(false, out); DataSerializer.writeObject(new EventID(), out); // Create a dummy ClientUpdateMessageImpl instance cum = new ClientUpdateMessageImpl(EnumListenerEvent.AFTER_CREATE, new ClientProxyMembershipID(), null, null); } InternalDataSerializer.invokeToData(cum, out); if (cum.hasCqs()) { DataSerializer.writeConcurrentHashMap(cum.getClientCqs(), out); } }
ClientProxyMembershipID serverProxyId = ClientProxyMembershipID .getNewProxyMembership(this._cache.getDistributedSystem()); ClientUpdateMessage updateMessage = new ClientUpdateMessageImpl( EnumListenerEvent.AFTER_CREATE, lr, keyOfInterest, value, null, (isObject ? (byte) 0x01 : (byte) 0x00), null, serverProxyId,
this.clientUpdateMessage = new ClientUpdateMessageImpl(); InternalDataSerializer.invokeFromData(this.clientUpdateMessage, in); ((ClientUpdateMessageImpl)this.clientUpdateMessage) InternalDataSerializer.invokeFromData(new ClientUpdateMessageImpl(), in);
ClientUpdateMessageImpl clientUpdateMsg = new ClientUpdateMessageImpl(operation, (LocalRegion)event.getRegion(), keyOfInterest, null, delta, (byte) 0x01, callbackArgument, membershipID, eventIdentifier, this._logger, versionTag);
ClientUpdateMessageImpl clientUpdateMsg = new ClientUpdateMessageImpl(operation, (LocalRegion)event.getRegion(), keyOfInterest, null, delta, (byte) 0x01, callbackArgument, membershipID, eventIdentifier, versionTag);
() -> new ClientProxyMembershipID()); registerDSFID(EVENT_ID, () -> new EventID()); registerDSFID(CLIENT_UPDATE_MESSAGE, () -> new ClientUpdateMessageImpl()); registerDSFID(CLEAR_REGION_MESSAGE_WITH_CONTEXT, () -> new ClearRegionWithContextMessage());