Package com.goodow.realtime.store.impl

Examples of com.goodow.realtime.store.impl.DocumentBridge.consume()


        Long opVersion = null;
        for (Object op : ops) {
          JsonObject opData = (JsonObject) op;
          opVersion = opData.getLong(Key.VERSION);
          try {
            snapshot.consume(transformer.createOperation(new JreJsonObject(opData.toMap())));
          } catch (Exception e) {
            log.log(Level.WARNING, "Failed to consume operation", e);
            callback.handle(new DefaultFutureResult<JsonObject>(new ReplyException(
                ReplyFailure.RECIPIENT_FAILURE, e.getMessage())));
            return;
View Full Code Here


              // Bring both the op and the snapshot up to date. At least one of these two
              // conditionals should be true.
              long opVersion = opData.getLong(Key.VERSION);
              if (snapshotV == opVersion) {
                try {
                  snapshot.consume(createOperation(opData));
                } catch (Exception e) {
                  callback.handle(new DefaultFutureResult<JsonObject>(new ReplyException(
                      ReplyFailure.RECIPIENT_FAILURE, e.getMessage())));
                  return;
                }
View Full Code Here

              }
            }

            // Ok, now we can try to apply the op.
            try {
              snapshot.consume(transformed);
            } catch (Exception e) {
              log.log(Level.WARNING, "Failed to consume operation", e);
              callback.handle(new DefaultFutureResult<JsonObject>(new ReplyException(
                  ReplyFailure.RECIPIENT_FAILURE, e.getMessage())));
              return;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.