コード例 #1
0
 public GatewayEventImpl(TimestampedEntryEventImpl entryEvent) {
   this.entryEvent = entryEvent;
   // We've to manage three representations of operations -
   // Operation, Type and GatewayEventType
   Type eventType = null;
   Operation op = entryEvent.getOperation();
   if (op.equals(Operation.CREATE)) {
     eventType = Type.AFTER_INSERT;
     this.type = GatewayEventType.INSERT;
   } else if (op.equals(Operation.UPDATE)) {
     eventType = Type.AFTER_UPDATE;
     this.type = GatewayEventType.UPDATE;
   } else if (op.equals(Operation.DESTROY)) {
     eventType = Type.AFTER_DELETE;
     this.type = GatewayEventType.DELETE;
   } else {
     throw new AssertionError(
         "Unexpected operation type " + op + " for gateway event: " + entryEvent);
   }
   this.eventImpl = new EventImpl(entryEvent, eventType);
 }
コード例 #2
0
 @Override
 public long getOldTimestamp() {
   return entryEvent.getOldTimestamp();
 }
コード例 #3
0
 @Override
 public int getOldDistributedSystemID() {
   return entryEvent.getOldDistributedSystemID();
 }
コード例 #4
0
 @Override
 public String toString() {
   return entryEvent.toString() + ",GatewayEventType=" + type;
 }