public class OakRepositoryFixture extends Object implements RepositoryFixture
Modifier | Constructor and Description |
---|---|
protected |
OakRepositoryFixture(OakFixture oakFixture) |
Modifier and Type | Method and Description |
---|---|
static RepositoryFixture |
getH2MK(File base,
long cacheSize) |
static RepositoryFixture |
getMemory(long cacheSize) |
static RepositoryFixture |
getMemoryMK(long cacheSize) |
static RepositoryFixture |
getMemoryNS(long cacheSize) |
static RepositoryFixture |
getMongo(String host,
int port,
String database,
boolean dropDBAfterTest,
long cacheSize) |
static RepositoryFixture |
getMongoMK(String host,
int port,
String database,
boolean dropDBAfterTest,
long cacheSize) |
static RepositoryFixture |
getMongoNS(String host,
int port,
String database,
boolean dropDBAfterTest,
long cacheSize) |
static RepositoryFixture |
getRDB(String jdbcuri,
String jdbcuser,
String jdbcpasswd,
String jdbctableprefix,
boolean dropDBAfterTest,
long cacheSize) |
static RepositoryFixture |
getTar(File base,
int maxFileSizeMB,
int cacheSizeMB,
boolean memoryMapping) |
boolean |
isAvailable(int n)
Checks whether this fixture is currently available.
|
javax.jcr.Repository[] |
setUpCluster(int n)
Creates a new repository cluster with the given number of nodes.
|
void |
syncRepositoryCluster(javax.jcr.Repository... nodes)
Ensures that all content changes seen by one of the given cluster
nodes are seen also by all the other given nodes.
|
void |
tearDownCluster()
Releases resources associated with the given repository cluster.
|
String |
toString() |
protected OakRepositoryFixture(OakFixture oakFixture)
public static RepositoryFixture getMemory(long cacheSize)
public static RepositoryFixture getMemoryNS(long cacheSize)
public static RepositoryFixture getMemoryMK(long cacheSize)
public static RepositoryFixture getH2MK(File base, long cacheSize)
public static RepositoryFixture getMongo(String host, int port, String database, boolean dropDBAfterTest, long cacheSize)
public static RepositoryFixture getMongoMK(String host, int port, String database, boolean dropDBAfterTest, long cacheSize)
public static RepositoryFixture getMongoNS(String host, int port, String database, boolean dropDBAfterTest, long cacheSize)
public static RepositoryFixture getRDB(String jdbcuri, String jdbcuser, String jdbcpasswd, String jdbctableprefix, boolean dropDBAfterTest, long cacheSize)
public static RepositoryFixture getTar(File base, int maxFileSizeMB, int cacheSizeMB, boolean memoryMapping)
public boolean isAvailable(int n)
RepositoryFixture
isAvailable
in interface RepositoryFixture
n
- size of the requested clustertrue
iff the fixture is availablepublic final javax.jcr.Repository[] setUpCluster(int n) throws Exception
RepositoryFixture
RepositoryFixture.tearDownCluster()
when the test cluster is no longer needed.setUpCluster
in interface RepositoryFixture
n
- size of the requested clusterException
- if the cluster could not be set uppublic void syncRepositoryCluster(javax.jcr.Repository... nodes)
RepositoryFixture
syncRepositoryCluster
in interface RepositoryFixture
nodes
- cluster nodes to be synchronizedpublic void tearDownCluster()
RepositoryFixture
RepositoryFixture.setUpCluster(int)
shall call this
method once the cluster is no longer needed.tearDownCluster
in interface RepositoryFixture
Copyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.