Examples of OperationsQueue


Examples of com.cumulocity.sdk.client.devicecontrol.autopoll.OperationsQueue

   
    @Test
    public void emptyQueueShouldAcceptMoreThanOneMeasurementAgentRequest() throws InterruptedException {
        //given
        MeasurementRequestTask mrt = new MeasurementRequestTask();
        OperationsQueue queue = new OperationsQueue();
       
        //when
        queue.add(mrt.getNewMeasurementOperation());
        Thread.sleep(1); // unique measurement operations use system time in millis. To ensure unique op wait at least 1 milli
        queue.add(mrt.getNewMeasurementOperation());
       
        //then
        assertTrue(queue.size() == 2);
    }
View Full Code Here

Examples of com.cumulocity.sdk.client.devicecontrol.autopoll.OperationsQueue

public class OperationsQueueTest {
    OperationsQueue testObj;
   
    @Before
    public void setUp() {
        testObj = new OperationsQueue();
        OperationRepresentation op1 = new OperationRepresentation();
        op1.setId(new GId("op1"));
        OperationRepresentation op2 = new OperationRepresentation();
        op2.setId(new GId("op2"));
        testObj.add(op1);
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

  public BatchOperationsDelegator(BatchableGridDialect dialect) {
    this.dialect = dialect;
  }

  public void prepareBatch() {
    operationQueueLocal.set( new OperationsQueue() );
  }
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

  public void clearBatch() {
    operationQueueLocal.remove();
  }

  private OperationsQueue getOperationQueue() {
    OperationsQueue operationsQueue = operationQueueLocal.get();
    if ( operationsQueue == null ) {
      return OperationsQueue.CLOSED_QUEUE;
    }
    else {
      return operationsQueue;
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

      return null;
    }
  }

  private boolean isInTheQueue(EntityKey key, TupleContext tupleContext) {
    OperationsQueue queue = tupleContext.getOperationsQueue();
    return queue != null && queue.contains( key );
  }
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

  public BatchOperationsDelegator(BatchableGridDialect dialect) {
    this.dialect = dialect;
  }

  public void prepareBatch() {
    operationQueueLocal.set( new OperationsQueue() );
  }
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

  public void clearBatch() {
    operationQueueLocal.remove();
  }

  private OperationsQueue getOperationQueue() {
    OperationsQueue operationsQueue = operationQueueLocal.get();
    if ( operationsQueue == null ) {
      return OperationsQueue.CLOSED_QUEUE;
    }
    else {
      return operationsQueue;
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

      return null;
    }
  }

  private boolean isInTheQueue(EntityKey key, TupleContext tupleContext) {
    OperationsQueue queue = tupleContext.getOperationsQueue();
    return queue != null && queue.contains( key );
  }
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

      return null;
    }
  }

  private boolean isInTheQueue(EntityKey key, TupleContext tupleContext) {
    OperationsQueue queue = tupleContext.getOperationsQueue();
    return queue != null && queue.contains( key );
  }
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.OperationsQueue

  public BatchOperationsDelegator(BatchableGridDialect dialect) {
    this.dialect = dialect;
  }

  public void prepareBatch() {
    operationQueueLocal.set( new OperationsQueue() );
  }
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.