Examples of SequenceInfo


Examples of org.apache.phoenix.schema.SequenceInfo

            boolean cycle, long timestamp) throws SQLException {
        SequenceKey key = new SequenceKey(tenantId, schemaName, sequenceName);
        if (sequenceMap.get(key) != null) {
            throw new SequenceAlreadyExistsException(schemaName, sequenceName);
        }
        sequenceMap.put(key, new SequenceInfo(startWith, incrementBy, minValue, maxValue, 1l, cycle)) ;
        return timestamp;
    }
View Full Code Here

Examples of org.apache.phoenix.schema.SequenceInfo

    @Override
    public void validateSequences(List<SequenceKey> sequenceKeys, long timestamp, long[] values,
            SQLException[] exceptions, Sequence.ValueOp action) throws SQLException {
        int i = 0;
        for (SequenceKey key : sequenceKeys) {
            SequenceInfo info = sequenceMap.get(key);
            if (info == null) {
                exceptions[i] = new SequenceNotFoundException(key.getSchemaName(), key.getSequenceName());
            } else {
                values[i] = info.sequenceValue;         
            }
View Full Code Here

Examples of org.apache.phoenix.schema.SequenceInfo

    @Override
    public void incrementSequences(List<SequenceKey> sequenceKeys, long timestamp, long[] values,
            SQLException[] exceptions) throws SQLException {
        int i = 0;
    for (SequenceKey key : sequenceKeys) {
      SequenceInfo info = sequenceMap.get(key);
      if (info == null) {
        exceptions[i] = new SequenceNotFoundException(
            key.getSchemaName(), key.getSequenceName());
      } else {
        boolean increaseSeq = info.incrementBy > 0;
View Full Code Here

Examples of org.apache.phoenix.schema.SequenceInfo

        }
    }

    @Override
    public long currentSequenceValue(SequenceKey sequenceKey, long timestamp) throws SQLException {
        SequenceInfo info = sequenceMap.get(sequenceKey);
        if (info == null) {
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_CALL_CURRENT_BEFORE_NEXT_VALUE)
            .setSchemaName(sequenceKey.getSchemaName()).setTableName(sequenceKey.getSequenceName())
            .build().buildException();
        }
View Full Code Here

Examples of org.apache.phoenix.schema.SequenceInfo

            boolean cycle, long timestamp) throws SQLException {
        SequenceKey key = new SequenceKey(tenantId, schemaName, sequenceName);
        if (sequenceMap.get(key) != null) {
            throw new SequenceAlreadyExistsException(schemaName, sequenceName);
        }
        sequenceMap.put(key, new SequenceInfo(startWith, incrementBy, minValue, maxValue, 1l, cycle)) ;
        return timestamp;
    }
View Full Code Here

Examples of org.apache.phoenix.schema.SequenceInfo

    @Override
    public void validateSequences(List<SequenceKey> sequenceKeys, long timestamp, long[] values,
            SQLException[] exceptions, Sequence.ValueOp action) throws SQLException {
        int i = 0;
        for (SequenceKey key : sequenceKeys) {
            SequenceInfo info = sequenceMap.get(key);
            if (info == null) {
                exceptions[i] = new SequenceNotFoundException(key.getSchemaName(), key.getSequenceName());
            } else {
                values[i] = info.sequenceValue;         
            }
View Full Code Here

Examples of org.apache.phoenix.schema.SequenceInfo

    @Override
    public void incrementSequences(List<SequenceKey> sequenceKeys, long timestamp, long[] values,
            SQLException[] exceptions) throws SQLException {
        int i = 0;
    for (SequenceKey key : sequenceKeys) {
      SequenceInfo info = sequenceMap.get(key);
      if (info == null) {
        exceptions[i] = new SequenceNotFoundException(
            key.getSchemaName(), key.getSequenceName());
      } else {
        boolean increaseSeq = info.incrementBy > 0;
View Full Code Here

Examples of org.apache.phoenix.schema.SequenceInfo

        }
    }

    @Override
    public long currentSequenceValue(SequenceKey sequenceKey, long timestamp) throws SQLException {
        SequenceInfo info = sequenceMap.get(sequenceKey);
        if (info == null) {
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_CALL_CURRENT_BEFORE_NEXT_VALUE)
            .setSchemaName(sequenceKey.getSchemaName()).setTableName(sequenceKey.getSequenceName())
            .build().buildException();
        }
View Full Code Here

Examples of org.wso2.carbon.sequences.common.to.SequenceInfo

            if (temp == null || temp.length == 0 || temp[0] == null) {
                return null;
            }

            for (TemplateInfo info : temp) {
                SequenceInfo seqInfo = new SequenceInfo();
                seqInfo.setEnableStatistics(info.getEnableStatistics());
                seqInfo.setEnableTracing(info.getEnableTracing());
                seqInfo.setName(info.getName());
                seqInfo.setDescription(info.getDescription());
                sequences.add(seqInfo);
            }
        } catch (Exception e) {
            handleException("Couldn't retrieve the information of the templates", e);
        }
View Full Code Here

Examples of org.wso2.carbon.sequences.common.to.SequenceInfo

            if (temp == null || temp.length == 0 || temp[0] == null) {
                return null;
            }

            for (TemplateInfo info : temp) {
                SequenceInfo seqInfo = new SequenceInfo();
                seqInfo.setName(info.getName());
                sequences.add(seqInfo);
            }
        } catch (Exception e) {
            handleException("Couldn't retrieve the information of the templates", e);
        }
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.