Package cern.entwined.exception

Examples of cern.entwined.exception.NoTransactionException


     * @throws MemoryException if there is no running transaction.
     */
    protected BaseSnapshot<T> getBaseSnapshot() {
        LinkedList<BaseSnapshot<T>> stack = this.getSnapshotStack();
        if (stack.isEmpty()) {
            throw new NoTransactionException("There is no running transaction, cannot access the base snapshot");
        }
        return stack.peek();
    }
View Full Code Here


    @SuppressWarnings("unchecked")
    public T get() {
        try {
            return (T) memory.getBaseSnapshot().getGlobalMap().get(this.id);
        } catch (NoTransactionException ex) {
            throw new NoTransactionException("Cannot read from GlobalReference outside of a transaction", ex);
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public T set(T newValue) {
        try {
            return (T) memory.getBaseSnapshot().getGlobalMap().put(this.id, newValue);
        } catch (NoTransactionException ex) {
            throw new NoTransactionException("Cannot write to GlobalReference outside of a transaction", ex);
        }
    }
View Full Code Here

     * @throws MemoryException if there is no running transaction.
     */
    protected BaseSnapshot<T> getBaseSnapshot() {
        LinkedList<BaseSnapshot<T>> stack = this.getSnapshotStack();
        if (stack.isEmpty()) {
            throw new NoTransactionException("There is no running transaction, cannot access the base snapshot");
        }
        return stack.peek();
    }
View Full Code Here

TOP

Related Classes of cern.entwined.exception.NoTransactionException

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.