@Override public void afterCreate(EntryEvent event) { if (this.sender.isPrimary()) { // The secondary has failed over to become the primary. There is a small // window where the secondary has become the primary, but the listener // is // still set. Ignore any updates to the map at this point. It is unknown // what the state of the map is. This may result in duplicate events // being sent. return; } // There is a small window where queue has not been created fully yet. // The underlying region of the queue is created, and it receives afterDestroy callback if (this.sender.getQueues() != null && !this.sender.getQueues().isEmpty()) { // int size = 0; // for(RegionQueue q: this.sender.getQueues()) { // size += q.size(); // } this.sender.getStatistics().incQueueSize(); } // fix bug 35730 // Send event to the event dispatcher GatewaySenderEventImpl senderEvent = (GatewaySenderEventImpl)event.getNewValue(); this.processor.handlePrimaryEvent(senderEvent); }
@Override public void afterCreate(EntryEvent event) { if (this.sender.isPrimary()) { // The secondary has failed over to become the primary. There is a small // window where the secondary has become the primary, but the listener // is // still set. Ignore any updates to the map at this point. It is unknown // what the state of the map is. This may result in duplicate events // being sent. //GatewayImpl.this._logger.severe(GatewayImpl.this + ": XXXXXXXXX IS // PRIMARY BUT PROCESSING AFTER_DESTROY EVENT XXXXXXXXX: " + event); return; } // There is a small window where queue has not been created fully yet. // The underlying region of the queue is created, and it receives afterDestroy callback if (this.sender.getQueues() != null && !this.sender.getQueues().isEmpty()) { // int size = 0; // for(RegionQueue q: this.sender.getQueues()) { // size += q.size(); // } this.sender.getStatistics().incQueueSize(); } // fix bug 35730 // Send event to the event dispatcher GatewaySenderEventImpl senderEvent = (GatewaySenderEventImpl)event.getNewValue(); this.processor.handlePrimaryEvent(senderEvent); }