Examples of Batch


Examples of org.teiid.jdbc.BatchResults.Batch

  }

  private Batch getCurrentBatch(ResultsMessage currentResultMsg) {
    this.updatedPlanDescription = currentResultMsg.getPlanDescription();
    boolean isLast = currentResultMsg.getResults().length == 0 || currentResultMsg.getFinalRow() == currentResultMsg.getLastRow();
    Batch result = new Batch(currentResultMsg.getResults(), currentResultMsg.getFirstRow(), currentResultMsg.getLastRow(), isLast);
    result.setLastRow(currentResultMsg.getFinalRow());
    return result;
  }
View Full Code Here

Examples of org.wildfly.clustering.ee.Batch

    @Override
    public V create() {
        boolean newGroup = false;
        boolean success = false;
        UUID group = CURRENT_GROUP.get();
        Batch batch = this.manager.getBatcher().createBatch();
        try {
            if (group == null) {
                newGroup = true;
                group = this.manager.getGroupIdentifierFactory().createIdentifier();
                CURRENT_GROUP.set(group);
            }

            try {
                // This will invoke Cache.create() for nested beans
                // Nested beans will share the same group identifier
                V instance = this.factory.createInstance();
                K id = instance.getId();
                this.manager.createBean(id, group, instance).close();
                success = true;
                return instance;
            } finally {
                if (newGroup) {
                    CURRENT_GROUP.remove();
                }
            }
        } finally {
            if (success) {
                batch.close();
            } else {
                batch.discard();
            }
        }
    }
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.