Package org.hibernate.ogm.dialect.batch.spi

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


      return null;
    }
  }

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

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

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

  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

  private OperationsQueue queue;

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

      return null;
    }
  }

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

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

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

  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

Related Classes of org.hibernate.ogm.dialect.batch.spi.OperationsQueue

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.