Package com.persistit

Examples of com.persistit.SessionId


    private static final Logger log = LoggerFactory.getLogger(PersistitTransaction.class);

    private static Queue<SessionId> sessionPool = new ConcurrentLinkedQueue<SessionId>();

    private static SessionId getSessionId() {
        SessionId s = sessionPool.poll();
        if (s == null) {
            s = new SessionId();
        }
        return s;
    }
View Full Code Here


    }

    @Override
    public <T> T run(Session session, Callable<T> callable) {
        Transaction oldTransaction = getTransaction(session);
        SessionId oldSessionId = null;
        Long oldStartMillis = null;
        if ((oldTransaction != null) &&
            // Anything that would prevent begin() from working.
            (oldTransaction.isActive() ||
             oldTransaction.isRollbackPending() ||
             oldTransaction.isCommitted())) {
            oldSessionId = treeService.getDb().getSessionId();
            treeService.getDb().setSessionId(new SessionId());
            session.remove(TXN_KEY);
            oldStartMillis = session.remove(START_MILLIS_KEY);
        }
        try {
            for(int tries = 1; ; ++tries) {
View Full Code Here

TOP

Related Classes of com.persistit.SessionId

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.