Interface ResourceService.ResourceTransaction

All Superinterfaces:
AutoCloseable
Enclosing interface:
ResourceService

public static interface ResourceService.ResourceTransaction extends AutoCloseable
Represents a transaction against a single instance of a Resource. When accessing a Resource, this ensures a write-lock on the resource as well as all modifications it may make therein.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the transaction
    void
    Commits the transaction.
    Gets the Resource.
    void
    Rolls the transaction back.
  • Method Details

    • getResource

      Resource getResource()
      Gets the Resource.
      Returns:
      the Resource.
    • commit

      void commit()
      Commits the transaction.
    • rollback

      void rollback()
      Rolls the transaction back.
    • close

      void close()
      Closes the transaction
      Specified by:
      close in interface AutoCloseable