Class DataStoreUtils
- java.lang.Object
-
- org.apache.jackrabbit.oak.fixture.DataStoreUtils
-
public class DataStoreUtils extends Object
Extension toDataStoreUtils
to enable S3 / AzureBlob extensions for cleaning and initialization.
-
-
Constructor Summary
Constructors Constructor Description DataStoreUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cleanup(File storeDir, Map<String,?> config, String bucket)
Clean directory and if S3 bucket/Azure container is configured delete that.static DataStore
configureIfCloudDataStore(String className, DataStore ds, Map<String,?> config, String bucket, StatisticsProvider statisticsProvider)
static void
deleteAzureContainer(Map<String,?> config, String containerName)
static void
deleteBucket(String bucket, Map<String,?> map, Date date)
static boolean
isAzureDataStore(String dsName)
static boolean
isS3DataStore(String dsName)
-
-
-
Method Detail
-
isS3DataStore
public static boolean isS3DataStore(String dsName)
-
isAzureDataStore
public static boolean isAzureDataStore(String dsName)
-
configureIfCloudDataStore
public static DataStore configureIfCloudDataStore(String className, DataStore ds, Map<String,?> config, String bucket, StatisticsProvider statisticsProvider) throws Exception
- Throws:
Exception
-
cleanup
public static void cleanup(File storeDir, Map<String,?> config, String bucket) throws Exception
Clean directory and if S3 bucket/Azure container is configured delete that.- Parameters:
storeDir
- the local directoryconfig
- the datastore configbucket
- the S3 bucket name / Azure container name- Throws:
Exception
-
deleteBucket
public static void deleteBucket(String bucket, Map<String,?> map, Date date) throws Exception
- Throws:
Exception
-
-