Package com.persistit.exception

Examples of com.persistit.exception.RollbackException


                            // version is from concurrent txn that already
                            // committed
                            // or timed out waiting to see. Either
                            // way, must abort.
                            _transaction.rollback();
                            throw new RollbackException();
                        }
                    } catch (final InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                } catch (final RetryException re) {
View Full Code Here


                    if (depends != 0 && depends != TransactionStatus.ABORTED) {
                        // version is from concurrent txn that already committed
                        // or timed out waiting to see. Either
                        // way, must abort.
                        _exchange._transaction.rollback();
                        throw new RollbackException();
                    }
                    if (version > _foundVersion) {
                        _foundVersion = version;
                    }
                    break;
View Full Code Here

                        if (_first.getVersion() > entry.getVersion()) {
                            /*
                             * This thread lost a race to make the most recent
                             * version
                             */
                            throw new RollbackException();
                        }
                        if (txn.isActive()) {
                            for (Entry e = _first; e != null; e = e.getPrevious()) {
                                final long version = e.getVersion();
                                final long depends = ti.wwDependency(version, txn.getTransactionStatus(), 0);
                                if (depends == TIMED_OUT) {
                                    throw new WWRetryException(version);
                                }
                                if (depends != 0 && depends != ABORTED) {
                                    /*
                                     * version is from a concurrent transaction
                                     * that already committed or timed out
                                     * waiting to see. Either way, must abort.
                                     */
                                    throw new RollbackException();
                                }
                            }
                        }
                    }
                    entry.setPrevious(_first);
                    _first = entry;
                    break;
                }
            } catch (final WWRetryException re) {
                try {
                    final long depends = _persistit.getTransactionIndex().wwDependency(re.getVersionHandle(),
                            txn.getTransactionStatus(), SharedResource.DEFAULT_MAX_WAIT_TIME);
                    if (depends != 0 && depends != ABORTED) {
                        /*
                         * version is from concurrent txn that already committed
                         * or timed out waiting to see. Either way, must abort.
                         */
                        throw new RollbackException();
                    }
                } catch (final InterruptedException ie) {
                    throw new PersistitInterruptedException(ie);
                }
            } catch (final InterruptedException ie) {
View Full Code Here

     *
     * @throws RollbackException
     */
    public void checkPendingRollback() throws RollbackException {
        if (_rollbackPending) {
            throw new RollbackException();
        }
    }
View Full Code Here

                            // version is from concurrent txn that already
                            // committed
                            // or timed out waiting to see. Either
                            // way, must abort.
                            _transaction.rollback();
                            throw new RollbackException();
                        }
                    } catch (final InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                } catch (final RetryException re) {
View Full Code Here

                    if (depends != 0 && depends != TransactionStatus.ABORTED) {
                        // version is from concurrent txn that already committed
                        // or timed out waiting to see. Either
                        // way, must abort.
                        _exchange._transaction.rollback();
                        throw new RollbackException();
                    }
                    if (version > _foundVersion) {
                        _foundVersion = version;
                    }
                    break;
View Full Code Here

     *
     * @throws RollbackException
     */
    public void checkPendingRollback() throws RollbackException {
        if (_rollbackPending) {
            throw new RollbackException();
        }
    }
View Full Code Here

                            // version is from concurrent txn that already
                            // committed
                            // or timed out waiting to see. Either
                            // way, must abort.
                            _transaction.rollback();
                            throw new RollbackException();
                        }
                    } catch (final InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                } catch (final RetryException re) {
View Full Code Here

                    if (depends != 0 && depends != TransactionStatus.ABORTED) {
                        // version is from concurrent txn that already committed
                        // or timed out waiting to see. Either
                        // way, must abort.
                        _exchange._transaction.rollback();
                        throw new RollbackException();
                    }
                    if (version > _foundVersion) {
                        _foundVersion = version;
                    }
                    break;
View Full Code Here

     *
     * @throws RollbackException
     */
    public void checkPendingRollback() throws RollbackException {
        if (_rollbackPending) {
            throw new RollbackException();
        }
    }
View Full Code Here

TOP

Related Classes of com.persistit.exception.RollbackException

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.