Examples of OperationsQueue


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

    return dialect.getLockingStrategy( lockable, lockMode );
  }

  @Override
  public Tuple getTuple(EntityKey key, TupleContext tupleContext) {
    OperationsQueue queue = getOperationQueue();
    tupleContext.setOperationsQueue( queue );
    return dialect.getTuple( key, tupleContext );
  }
View Full Code Here

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

    return result;
  }

  @Override
  public void executeBatch(OperationsQueue queue) {
    OperationsQueue newQueue = new OperationsQueue();
    StringBuilder sb = new StringBuilder();

    if ( !queue.isClosed() ) {
      Operation operation = queue.poll();
      while ( operation != null ) {
        newQueue.add( operation );

        if ( operation instanceof InsertOrUpdateTupleOperation ) {
          sb.append( "InsertOrUpdateTuple(" ).append( ( (InsertOrUpdateTupleOperation) operation ).getEntityKey() ).append( " )" );
        }
        else if ( operation instanceof RemoveTupleOperation ) {
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.spi.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.spi.OperationsQueue

  public BatchOperationsDelegator(BatchableGridDialect dialect) {
    super( dialect );
  }

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

Examples of org.hibernate.ogm.dialect.batch.spi.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.spi.OperationsQueue

  private OperationsQueue queue;

  @Before
  public void init() {
    queue = new OperationsQueue();
  }
View Full Code Here

Examples of org.hibernate.ogm.dialect.batch.spi.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.spi.OperationsQueue

  public BatchOperationsDelegator(BatchableGridDialect dialect) {
    super( dialect );
  }

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

Examples of org.hibernate.ogm.dialect.batch.spi.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
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.