Class JackrabbitRepositoryFixture
java.lang.Object
org.apache.jackrabbit.oak.fixture.JackrabbitRepositoryFixture
- All Implemented Interfaces:
RepositoryFixture
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAvailable(int n) Checks whether this fixture is currently available.setUpCluster(int n) Creates a new repository cluster with the given number of nodes.voidsyncRepositoryCluster(Repository... nodes) Ensures that all content changes seen by one of the given cluster nodes are seen also by all the other given nodes.voidReleases resources associated with the given repository cluster.toString()
-
Constructor Details
-
JackrabbitRepositoryFixture
-
-
Method Details
-
isAvailable
public boolean isAvailable(int n) Description copied from interface:RepositoryFixtureChecks whether this fixture is currently available. For example a database-based fixture would only be available when the underlying database service is running.- Specified by:
isAvailablein interfaceRepositoryFixture- Parameters:
n- size of the requested cluster- Returns:
trueiff the fixture is available
-
setUpCluster
Description copied from interface:RepositoryFixtureCreates a new repository cluster with the given number of nodes. The initial state of the cluster consists of just the default repository content included by the implementation. The caller of this method should have exclusive access to the created cluster. The caller is also responsible for callingRepositoryFixture.tearDownCluster()when the test cluster is no longer needed.- Specified by:
setUpClusterin interfaceRepositoryFixture- Parameters:
n- size of the requested cluster- Returns:
- nodes of the created cluster
- Throws:
Exception- if the cluster could not be set up
-
syncRepositoryCluster
Description copied from interface:RepositoryFixtureEnsures that all content changes seen by one of the given cluster nodes are seen also by all the other given nodes. Used to help testing features like eventual consistency where the normal APIs don't make strong enough guarantees to enable writing a test case without a potentially unbounded wait for changes to propagate across the cluster.- Specified by:
syncRepositoryClusterin interfaceRepositoryFixture- Parameters:
nodes- cluster nodes to be synchronized
-
tearDownCluster
public void tearDownCluster()Description copied from interface:RepositoryFixtureReleases resources associated with the given repository cluster. The caller ofRepositoryFixture.setUpCluster(int)shall call this method once the cluster is no longer needed.- Specified by:
tearDownClusterin interfaceRepositoryFixture
-
toString
-