Interface ResourceTransaction

All Superinterfaces:
Resource

public interface ResourceTransaction extends Resource
A writable resource containing data (features or coverages) that can be changed in a all-or-nothing way. Resource transaction shall also implement at least one of the Writable* interfaces. If the resource is an Aggregate, then this transaction includes both this resource and all children resources.
Since:
1.0
Version:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Makes permanent all changes that have been in current transaction.
    void
    Undoes all changes made in the current transaction.

    Methods inherited from interface org.apache.sis.storage.Resource

    addListener, getIdentifier, getMetadata, removeListener
  • Method Details

    • commit

      void commit() throws DataStoreException
      Makes permanent all changes that have been in current transaction. The current transaction contains the changes performed since the ResourceTransaction creation, or since the last call to either the commit() or rollback() methods.
      Throws:
      DataStoreException - if an error occurred while committing the transaction. In such case, the system shall be in state before the commit attempt.
    • rollback

      void rollback() throws DataStoreException
      Undoes all changes made in the current transaction. The current transaction contains the changes performed since the ResourceTransaction creation, or since the last call to either the commit() or rollback() methods.
      Throws:
      DataStoreException - if an error occurred while rolling back the transaction. In such case, the system shall be in state before the rollback attempt.