Package com.persistit.exception

Examples of com.persistit.exception.PersistitInterruptedException


            flushTransactionBuffer(false);
            try {
                _transactionStatus = _persistit.getTransactionIndex().registerTransaction();
            } catch (final InterruptedException e) {
                _rollbackCompleted = true;
                throw new PersistitInterruptedException(e);
            }
            _rollbackPending = false;
            _rollbackCompleted = false;
            _startTimestamp = _transactionStatus.getTs();
            _commitTimestamp = 0;
View Full Code Here


            flushTransactionBuffer(false);
            try {
                _transactionStatus = _persistit.getTransactionIndex().registerCheckpointTransaction();
            } catch (final InterruptedException e) {
                _rollbackCompleted = true;
                throw new PersistitInterruptedException(e);
            }
            _rollbackPending = false;
            _rollbackCompleted = false;
            _startTimestamp = _transactionStatus.getTs();
            _commitTimestamp = 0;
View Full Code Here

                    if (_sync.tryAcquireSharedNanos(1, timeout * 1000000)) {
                        return true;
                    }
                }
            } catch (final InterruptedException e) {
                throw new PersistitInterruptedException(e);
            }
            return false;
        }
    }
View Full Code Here

                _currentCheckpoint = new Checkpoint(txn.getStartTimestamp(), System.currentTimeMillis());
                _outstandingCheckpoints.add(_currentCheckpoint);
                _persistit.getLogBase().checkpointProposed.log(_currentCheckpoint);
                return _currentCheckpoint;
            } catch (InterruptedException ie) {
                throw new PersistitInterruptedException(ie);
            } finally {
                txn.end();
            }
        } finally {
            _persistit.setSessionId(saveSessionId);
View Full Code Here

                } else if (item.getStartTimestamp() < _lastValidCheckpoint.getTimestamp()) {
                    _uncommittedTransactionCount++;
                    try {
                        _persistit.getTransactionIndex().injectAbortedTransaction(item.getStartTimestamp());
                    } catch (InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                } else {
                    /*
                     * An uncommitted transaction that started after the last
                     * valid checkpoint is of no interest.
View Full Code Here

     */
    long getSnapshotValue(final long timestamp, final int step) throws PersistitInterruptedException {
        try {
            return _transactionIndex.getAccumulatorSnapshot(this, timestamp, step, _baseValue);
        } catch (InterruptedException ie) {
            throw new PersistitInterruptedException(ie);
        }
    }
View Full Code Here

                            // way, must abort.
                            _transaction.rollback();
                            throw new RollbackException();
                        }
                    } catch (InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                } catch (RetryException re) {
                    if (buffer != null) {
                        buffer.releaseTouched();
                        buffer = null;
View Full Code Here

                    try {
                        if (delay > 0 && _lock.readLock().tryLock(delay, TimeUnit.NANOSECONDS)) {
                            _lock.readLock().unlock();
                        }
                    } catch (InterruptedException e) {
                        throw new PersistitInterruptedException(e);
                    }
                }
            }
            if (_lastExceptionTimestamp > timestamp) {
                final Exception e = _lastException;
View Full Code Here

                // Wait for UI to go down.
                while (_suspendShutdown.get()) {
                    try {
                        wait(SHORT_DELAY);
                    } catch (InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                }
            }

            /*
 
View Full Code Here

        if (isClosed()) {
            checkFatal();
            throw new PersistitClosedException();
        }
        if (Thread.currentThread().isInterrupted()) {
            throw new PersistitInterruptedException(new InterruptedException());
        }
    }
View Full Code Here

TOP

Related Classes of com.persistit.exception.PersistitInterruptedException

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.