Class OakRepositoryFixture
- java.lang.Object
-
- org.apache.jackrabbit.oak.fixture.OakRepositoryFixture
-
- All Implemented Interfaces:
RepositoryFixture
public class OakRepositoryFixture extends Object implements RepositoryFixture
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedOakRepositoryFixture(OakFixture oakFixture)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RepositoryFixturegetCompositeMemoryStore()static RepositoryFixturegetCompositeMongoStore(String uri, long cacheSize, boolean dropDBAfterTest, boolean throttlingEnabled)static RepositoryFixturegetCompositeStore(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold)static RepositoryFixturegetMemoryNS(long cacheSize)static RepositoryFixturegetMongo(String uri, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)static RepositoryFixturegetMongo(String host, int port, String database, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)static RepositoryFixturegetMongoNS(String uri, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)static RepositoryFixturegetMongoNS(String host, int port, String database, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)static RepositoryFixturegetMongoWithDS(String uri, boolean dropDBAfterTest, long cacheSize, File base, int fdsCacheInMB, boolean throttlingEnabled)static RepositoryFixturegetMongoWithDS(String host, int port, String database, boolean dropDBAfterTest, long cacheSize, File base, int fdsCacheInMB, boolean throttlingEnabled)OakFixturegetOakFixture()static RepositoryFixturegetRDB(String jdbcuri, String jdbcuser, String jdbcpasswd, String jdbctableprefix, boolean dropDBAfterTest, long cacheSize, int vgcMaxAge)static RepositoryFixturegetRDBWithDS(String jdbcuri, String jdbcuser, String jdbcpasswd, String jdbctableprefix, boolean dropDBAfterTest, long cacheSize, File base, int fdsCacheInMB, int vgcMaxAge)static RepositoryFixturegetSegmentTar(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold)static RepositoryFixturegetSegmentTarWithAwsSegmentStore(File base, String awsBucketName, String awsRootPath, String awsJournalTableName, String awsLockTableName, int maxFileSizeMB, int cacheSizeMB, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB)static RepositoryFixturegetSegmentTarWithAzureSegmentStore(File base, String azureConnectionString, String azureContainerName, String azureRootPath, int maxFileSizeMB, int cacheSizeMB, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB)static RepositoryFixturegetSegmentTarWithColdStandby(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB, int syncInterval, boolean shareBlobStore, boolean secure, boolean oneShotRun)static RepositoryFixturegetSegmentTarWithDataStore(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold, int dsCacheInMB)booleanisAvailable(int n)Checks whether this fixture is currently available.voidsetStatisticsProvider(StatisticsProvider statisticsProvider)Repository[]setUpCluster(int n)Creates a new repository cluster with the given number of nodes.Repository[]setUpCluster(int n, JcrCreator customizer)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.voidtearDownCluster()Releases resources associated with the given repository cluster.StringtoString()
-
-
-
Constructor Detail
-
OakRepositoryFixture
protected OakRepositoryFixture(OakFixture oakFixture)
-
-
Method Detail
-
getMemoryNS
public static RepositoryFixture getMemoryNS(long cacheSize)
-
getMongo
public static RepositoryFixture getMongo(String host, int port, String database, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)
-
getMongo
public static RepositoryFixture getMongo(String uri, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)
-
getMongoWithDS
public static RepositoryFixture getMongoWithDS(String host, int port, String database, boolean dropDBAfterTest, long cacheSize, File base, int fdsCacheInMB, boolean throttlingEnabled)
-
getMongoWithDS
public static RepositoryFixture getMongoWithDS(String uri, boolean dropDBAfterTest, long cacheSize, File base, int fdsCacheInMB, boolean throttlingEnabled)
-
getMongoNS
public static RepositoryFixture getMongoNS(String host, int port, String database, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)
-
getMongoNS
public static RepositoryFixture getMongoNS(String uri, boolean dropDBAfterTest, long cacheSize, boolean throttlingEnabled)
-
getRDB
public static RepositoryFixture getRDB(String jdbcuri, String jdbcuser, String jdbcpasswd, String jdbctableprefix, boolean dropDBAfterTest, long cacheSize, int vgcMaxAge)
-
getRDBWithDS
public static RepositoryFixture getRDBWithDS(String jdbcuri, String jdbcuser, String jdbcpasswd, String jdbctableprefix, boolean dropDBAfterTest, long cacheSize, File base, int fdsCacheInMB, int vgcMaxAge)
-
getSegmentTar
public static RepositoryFixture getSegmentTar(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold)
-
getSegmentTarWithDataStore
public static RepositoryFixture getSegmentTarWithDataStore(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold, int dsCacheInMB)
-
getSegmentTarWithColdStandby
public static RepositoryFixture getSegmentTarWithColdStandby(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB, int syncInterval, boolean shareBlobStore, boolean secure, boolean oneShotRun)
-
getSegmentTarWithAwsSegmentStore
public static RepositoryFixture getSegmentTarWithAwsSegmentStore(File base, String awsBucketName, String awsRootPath, String awsJournalTableName, String awsLockTableName, int maxFileSizeMB, int cacheSizeMB, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB)
-
getSegmentTarWithAzureSegmentStore
public static RepositoryFixture getSegmentTarWithAzureSegmentStore(File base, String azureConnectionString, String azureContainerName, String azureRootPath, int maxFileSizeMB, int cacheSizeMB, int binariesInlineThreshold, boolean useBlobStore, int dsCacheInMB)
-
getCompositeStore
public static RepositoryFixture getCompositeStore(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping, int binariesInlineThreshold)
-
getCompositeMemoryStore
public static RepositoryFixture getCompositeMemoryStore()
-
getCompositeMongoStore
public static RepositoryFixture getCompositeMongoStore(String uri, long cacheSize, boolean dropDBAfterTest, boolean throttlingEnabled)
-
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
public final Repository[] setUpCluster(int n) throws Exception
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
-
setUpCluster
public Repository[] setUpCluster(int n, JcrCreator customizer) throws Exception
- Throws:
Exception
-
syncRepositoryCluster
public void syncRepositoryCluster(Repository... nodes)
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
-
getOakFixture
public OakFixture getOakFixture()
-
setStatisticsProvider
public void setStatisticsProvider(StatisticsProvider statisticsProvider)
-
-