org.eclipse.rdf4j.federated.write

## Class ReadOnlyWriteStrategy

- java.lang.Object
- - org.eclipse.rdf4j.federated.write.ReadOnlyWriteStrategy

- All Implemented Interfaces:
    AutoCloseable, WriteStrategy

      public class ReadOnlyWriteStrategy
      extends Object
      implements WriteStrategy

  Default `WriteStrategy` implementation for read only federations. In case a user attempts to perform a write operation a `UnsupportedOperationException` is thrown.
  Author:
    Andreas Schwarte

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ReadOnlyWriteStrategy` | `INSTANCE`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStatement(Resource subj, IRI pred, Value obj, Resource... contexts)` Add a statement
    `void` | `begin()` Begin a transaction.
    `void` | `clear(Resource... contexts)`
    `void` | `clearNamespaces()`
    `void` | `close()` Close this write strategy (e.g.
    `void` | `commit()` Commit a transaction.
    `void` | `removeStatement(Resource subj, IRI pred, Value obj, Resource... contexts)` Remove a statement
    `void` | `rollback()` Rollback a transaction.
    `void` | `setTransactionSettings(TransactionSetting... transactionSettings)` Assign `TransactionSetting`s to be used for the next transaction.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final ReadOnlyWriteStrategy INSTANCE

  - ### Method Detail

    - #### begin

          public void begin()
                     throws RepositoryException

      Description copied from interface: `WriteStrategy`
      Begin a transaction.
      Specified by:
        `begin` in interface `WriteStrategy`
      Throws:
        `RepositoryException`

    - #### commit

          public void commit()
                      throws RepositoryException

      Description copied from interface: `WriteStrategy`
      Commit a transaction.
      Specified by:
        `commit` in interface `WriteStrategy`
      Throws:
        `RepositoryException`

    - #### rollback

          public void rollback()
                        throws RepositoryException

      Description copied from interface: `WriteStrategy`
      Rollback a transaction.
      Specified by:
        `rollback` in interface `WriteStrategy`
      Throws:
        `RepositoryException`

    - #### setTransactionSettings

          public void setTransactionSettings(TransactionSetting... transactionSettings)
                                      throws RepositoryException

      Description copied from interface: `WriteStrategy`
      Assign `TransactionSetting`s to be used for the next transaction.
      Specified by:
        `setTransactionSettings` in interface `WriteStrategy`
      Parameters:
        `transactionSettings` - one or more `TransactionSetting`s
      Throws:
        `RepositoryException`

    - #### addStatement

          public void addStatement(Resource subj,
                                   IRI pred,
                                   Value obj,
                                   Resource... contexts)

      Description copied from interface: `WriteStrategy`
      Add a statement
      Specified by:
        `addStatement` in interface `WriteStrategy`

    - #### removeStatement

          public void removeStatement(Resource subj,
                                      IRI pred,
                                      Value obj,
                                      Resource... contexts)
                               throws RepositoryException

      Description copied from interface: `WriteStrategy`
      Remove a statement
      Specified by:
        `removeStatement` in interface `WriteStrategy`
      Throws:
        `RepositoryException`

    - #### clear

          public void clear(Resource... contexts)
                     throws RepositoryException

      Specified by:
        `clear` in interface `WriteStrategy`
      Throws:
        `RepositoryException`

    - #### close

          public void close()
                     throws RepositoryException

      Description copied from interface: `WriteStrategy`
      Close this write strategy (e.g. close a shared `RepositoryException`).
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `WriteStrategy`
      Throws:
        `RepositoryException`

    - #### clearNamespaces

          public void clearNamespaces()
                               throws RepositoryException

      Specified by:
        `clearNamespaces` in interface `WriteStrategy`
      Throws:
        `RepositoryException`

Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.