org.eclipse.rdf4j.sail

## Class SailConcurrencyTest

- java.lang.Object
- - org.eclipse.rdf4j.sail.SailConcurrencyTest

-     public abstract class SailConcurrencyTest
      extends Object

  Tests concurrent read and write access to a Sail implementation.
  Author:
    Arjohn Kampman

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `SailConcurrencyTest.UploadTransaction`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SailConcurrencyTest()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract Sail` | `createSail()`
    `protected void` | `fail(String message, Throwable t)`
    `protected boolean` | `hasFailed()`
    `protected void` | `insertTestStatement(SailConnection connection, int i)`
    `protected void` | `removeTestStatement(SailConnection connection, int i)`
    `void` | `setUp()`
    `void` | `tearDown()`
    `void` | `testConcurrentAddLargeTxn()` Verifies that two large concurrent transactions in separate contexts do not cause inconsistencies or errors.
    `void` | `testConcurrentAddLargeTxnRollback()` Verifies that two large concurrent transactions in separate contexts do not cause inconsistencies or errors when one of the transactions rolls back at the end.
    `void` | `testGetContextIDs()`

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

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

- - ### Constructor Detail

    - #### SailConcurrencyTest

          public SailConcurrencyTest()

  - ### Method Detail

    - #### setUp

          public void setUp()
                     throws Exception

      Throws:
        `Exception`

    - #### createSail

          protected abstract Sail createSail()
                                      throws SailException

      Throws:
        `SailException`

    - #### tearDown

          public void tearDown()
                        throws Exception

      Throws:
        `Exception`

    - #### testConcurrentAddLargeTxn

          public void testConcurrentAddLargeTxn()
                                         throws Exception

      Verifies that two large concurrent transactions in separate contexts do not cause inconsistencies or errors. This test may fail intermittently rather than consistently, given its dependency on multi-threading.
      Throws:
        `Exception`
      See Also:
        https://github.com/eclipse/rdf4j/issues/693

    - #### testConcurrentAddLargeTxnRollback

          public void testConcurrentAddLargeTxnRollback()
                                                 throws Exception

      Verifies that two large concurrent transactions in separate contexts do not cause inconsistencies or errors when one of the transactions rolls back at the end.
      Throws:
        `Exception`

    - #### testGetContextIDs

          public void testGetContextIDs()
                                 throws Exception

      Throws:
        `Exception`

    - #### fail

          protected void fail(String message,
                              Throwable t)

    - #### hasFailed

          protected boolean hasFailed()

    - #### insertTestStatement

          protected void insertTestStatement(SailConnection connection,
                                             int i)
                                      throws SailException

      Throws:
        `SailException`

    - #### removeTestStatement

          protected void removeTestStatement(SailConnection connection,
                                             int i)
                                      throws SailException

      Throws:
        `SailException`

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