@Override public Object getValueToConflate() { // Since all the uses of this are for logging // changing it to return the string form of the value // instead of the actual value. return this.getValueAsString(true); }
@Override public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("GatewaySenderEventImpl[").append("id=").append(this.id).append(";action=") .append(this.action).append(";operation=").append(getOperation()).append(";region=") .append(this.regionPath).append(";key=").append(this.key).append(";value=") .append(getValueAsString(true)).append(";valueIsObject=").append(this.valueIsObject) .append(";numberOfParts=").append(this.numberOfParts).append(";callbackArgument=") .append(this.callbackArgument).append(";possibleDuplicate=").append(this.possibleDuplicate) .append(";creationTime=").append(this.creationTime).append(";shadowKey=") .append(this.shadowKey).append(";timeStamp=").append(this.versionTimeStamp) .append(";acked=").append(this.isAcked).append(";dispatched=").append(this.isDispatched) .append(";bucketId=").append(this.bucketId).append(";isConcurrencyConflict=") .append(this.isConcurrencyConflict).append("]"); return buffer.toString(); }
/** * Logs a batch of events. * * @param events The batch of events to log **/ public void logBatchFine(String message, List<GatewaySenderEventImpl> events) { if (events != null) { StringBuffer buffer = new StringBuffer(); buffer.append(message); buffer.append(events.size()).append(" events"); buffer.append(" (batch #" + getBatchId()); buffer.append("):\n"); for (GatewaySenderEventImpl ge : events) { buffer.append("\tEvent ").append(ge.getEventId()).append(":"); buffer.append(ge.getKey()).append("->"); // TODO:wan70 remove old code buffer.append(ge.getValueAsString(true)).append(","); buffer.append(ge.getShadowKey()); buffer.append("\n"); } logger.debug(buffer); } }
"{} event for region={} key={} value={} was in the queue for {} milliseconds", new Object[] {ge.getOperation(), ge.getRegionPath(), ge.getKey(), ge.getValueAsString(true), currentTime - ge.getCreationTime()}); statistics.incEventsExceedingAlertThreshold();
logger.trace("{}: fromPrimary event {} : {}->{} added to unprocessed token map", sender.getId(), gatewayEvent.getEventId(), gatewayEvent.getKey(), gatewayEvent.getValueAsString(true)); "{}: Primary create/update event {}:{}->{} remove from unprocessed events map", sender.getId(), gatewayEvent.getEventId(), gatewayEvent.getKey(), gatewayEvent.getValueAsString(true));
logger.trace("{}: fromSecondary event {}:{}->{} added from unprocessed events map", sender.getId(), gatewayEvent.getEventId(), gatewayEvent.getKey(), gatewayEvent.getValueAsString(true)); logger.trace("{}: Secondary created event {}:{}->{} removed from unprocessed events map", sender.getId(), gatewayEvent.getEventId(), gatewayEvent.getKey(), gatewayEvent.getValueAsString(true));