All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bigdata.service.ITxState Maven / Gradle / Ivy

Go to download

Blazegraph(TM) DB Core Platform. It contains all Blazegraph DB dependencies other than Blueprints.

There is a newer version: 2.1.4
Show newest version
/**

Copyright (C) SYSTAP, LLC DBA Blazegraph 2006-2016.  All rights reserved.

Contact:
     SYSTAP, LLC DBA Blazegraph
     2501 Calvert ST NW #106
     Washington, DC 20008
     licenses@blazegraph.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General License as published by
the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General License for more details.

You should have received a copy of the GNU General License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
package com.bigdata.service;

import com.bigdata.journal.ITransactionService;

/**
 * Interface for the state associated with a transaction in an
 * {@link ITransactionService}.
 * 
 * @author Bryan Thompson
 */
public interface ITxState extends ITxState0 {

    /**
     * A transaction is "active" when it is created and remains active until it
     * prepares or aborts.  An active transaction accepts READ, WRITE, DELETE,
     * PREPARE and ABORT requests.
     * 
     * @return True iff the transaction is active.
     */
    boolean isActive();

    /**
     * A transaction is "prepared" once it has been successfully validated and
     * has fulfilled its pre-commit contract for a multi-stage commit protocol.
     * An prepared transaction accepts COMMIT and ABORT requests.
     * 

* Note: This is a transient state. Once the transaction has prepared it * will transition to either COMMIT or ABORT and this method will no longer * report true. * * @return True iff the transaction is prepared to commit. */ boolean isPrepared(); /** * A transaction is "complete" once has either committed or aborted. A * completed transaction does not accept any requests. * * @return True iff the transaction is completed. */ boolean isComplete(); /** * A transaction is "committed" iff it has successfully committed. A * committed transaction does not accept any requests. * * @return True iff the transaction is committed. */ boolean isCommitted(); /** * A transaction is "aborted" iff it has successfully aborted. An aborted * transaction does not accept any requests. * * @return True iff the transaction is aborted. */ boolean isAborted(); /** * Return true iff this is a read-only transaction. */ boolean isReadOnly(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy