Package org.jboss.errai.otec.client

Examples of org.jboss.errai.otec.client.OTQueuedOperation


  @Override
  public void stop(final boolean wait) {
    if (!wait) {
      setMode(OTEngineMode.Offline);
    }
    incomingQueue.offer(new OTQueuedOperation(-1, null, null, -1));
    housekeeperThread.interrupt();

    try {
      pollingThread.join();
      if (wait) {
View Full Code Here


    }
  }

  private boolean pollQueue() throws InterruptedException {
    try {
      final OTQueuedOperation queuedOp = incomingQueue.poll(10, TimeUnit.MINUTES);

      if (queuedOp == null) {
        return true;
      }
      else if (queuedOp.getEntityId() == -1) {
        return false;
      }
//
//      System.out.println("POLL_FROM_QUEUE:" + queuedOp.getOperation()
//          + ";rev" + queuedOp.getOperation().getRevision() + ";entity:" + queuedOp.getEntityId());
View Full Code Here

  public boolean receive(final String peerId, final OTOperation remoteOp) {
    if (remoteOp.getEntityId() == -1) {
      return true;
    }

    final OTQueuedOperation e = new OTQueuedOperation(remoteOp.getRevision(), remoteOp, peerId, remoteOp.getEntityId());
    getPeerState().getPeer(peerId).setLastKnownRemoteSequence(remoteOp.getEntityId(), remoteOp.getRevision());
    try {
      handleOperation(e);
    }
    catch (OTException ote) {
View Full Code Here

TOP

Related Classes of org.jboss.errai.otec.client.OTQueuedOperation

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.