Package com.google.walkaround.slob.shared

Examples of com.google.walkaround.slob.shared.ChangeRejected


        ret.add(serializer.serializeDelta(clientOps[i]));
      }

      return ret;
    } catch (TransformException e) {
      throw new ChangeRejected(e);
    } catch (MessageException e) {
      throw new ChangeRejected(e);
    }
  }
View Full Code Here


      cachedSnapshot = null;
      WaveletOperation op;
      try {
        op = serializer.deserializeDelta(change.getPayload());
      } catch (MessageException e) {
        throw new ChangeRejected("Malformed op: " + change, e);
      }

      if (wavelet == null) {
        try {
          wavelet = WaveletUtil.buildWaveletFromInitialOps(
              IdHack.FAKE_WAVELET_NAME, Collections.singletonList(op));
        } catch (OperationException e) {
          throw new ChangeRejected("Invalid initial op: " + op, e);
        }
      } else {
        try {
          op.apply(wavelet);
        } catch (OperationException e) {
          // Operation failed. The wavelet is still intact, however, so just
          // report the failure and continue on.
          throw new ChangeRejected("Invalid op at version " + wavelet.getVersion() + ": " + op, e);
        }
      }
    }
View Full Code Here

      public ConvHistoryWriter(SlobId slobId) {
        this.slobId = checkNotNull(slobId, "Null slobId");
      }

      private void flush() throws PermanentFailure, ChangeRejected {
        @Nullable ChangeRejected rejected = new RetryHelper().run(
            new RetryHelper.Body<ChangeRejected>() {
              @Override public ChangeRejected run() throws RetryableFailure, PermanentFailure {
                CheckedTransaction tx = datastore.beginTransaction();
                try {
                  MutationLog mutationLog = convSlobFacilities.getMutationLogFactory().create(
View Full Code Here

TOP

Related Classes of com.google.walkaround.slob.shared.ChangeRejected

Copyright © 2018 www.massapicom. 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.