Package com.foundationdb.server.store.FDBTransactionService

Examples of com.foundationdb.server.store.FDBTransactionService.TransactionState


            rowsWritten(session, -1);
        }

        @Override
        public void rowsWritten(Session session, long count) {
            TransactionState txn = txnService.getTransaction(session);
            txn.mutate(MutationType.ADD, rowCountKey, packForAtomicOp(count));
        }
View Full Code Here


            txn.mutate(MutationType.ADD, rowCountKey, packForAtomicOp(count));
        }

        @Override
        public void truncate(Session session) {
            TransactionState txn = txnService.getTransaction(session);
            txn.setBytes(rowCountKey, packForAtomicOp(0));
            internalSetAutoInc(session, 0, true);
        }
View Full Code Here

        }


        @Override
        public long getAutoIncrement(Session session) {
            TransactionState txn = txnService.getTransaction(session);
            return decodeOrZero(txn.getValue(autoIncKey));
        }
View Full Code Here

            return tableID;
        }

        @Override
        public void setRowCount(Session session, long rowCount) {
            TransactionState txn = txnService.getTransaction(session);
            txn.setBytes(rowCountKey, packForAtomicOp(rowCount));
        }
View Full Code Here

            TransactionState txn = txnService.getTransaction(session);
            txn.setBytes(rowCountKey, packForAtomicOp(rowCount));
        }

        private void clearState(Session session) {
            TransactionState txn = txnService.getTransaction(session);
            txn.clearKey(rowCountKey);
            txn.clearKey(autoIncKey);
        }
View Full Code Here

            txn.clearKey(rowCountKey);
            txn.clearKey(autoIncKey);
        }

        private void internalSetAutoInc(Session session, long value, boolean evenIfLess) {
            TransactionState txn = txnService.getTransaction(session);
            long current = decodeOrZero(txn.getValue(autoIncKey));
            if(evenIfLess || value > current) {
                txn.setBytes(autoIncKey, Tuple2.from(value).pack());
            }
        }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.store.FDBTransactionService.TransactionState

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.