Class ToolUtils
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.azure.tool.ToolUtils
-
public class ToolUtils extends java.lang.Object
Utility class for common stuff pertaining to tooling.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ToolUtils.SegmentStoreType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SegmentArchiveManager
createArchiveManager(SegmentNodeStorePersistence persistence)
static com.microsoft.azure.storage.blob.CloudBlobDirectory
createCloudBlobDirectory(java.lang.String path)
static com.microsoft.azure.storage.blob.CloudBlobDirectory
createCloudBlobDirectory(java.lang.String path, Environment environment)
static byte[]
fetchByteArray(Buffer buffer)
static @NotNull com.microsoft.azure.storage.StorageCredentials
getStorageCredentialsFromAccountAndEnv(@NotNull java.lang.String accountName)
static FileStore
newFileStore(SegmentNodeStorePersistence persistence, java.io.File directory, boolean strictVersionCheck, int segmentCacheSize, long gcLogInterval, SegmentGCOptions.CompactorType compactorType)
static FileStore
newFileStore(SegmentNodeStorePersistence persistence, java.io.File directory, boolean strictVersionCheck, int segmentCacheSize, long gcLogInterval, SegmentGCOptions.CompactorType compactorType, int gcConcurrency)
static SegmentNodeStorePersistence
newSegmentNodeStorePersistence(ToolUtils.SegmentStoreType storeType, java.lang.String pathOrUri)
static SegmentNodeStorePersistence
newSegmentNodeStorePersistence(ToolUtils.SegmentStoreType storeType, java.lang.String pathOrUri, java.lang.String persistentCachePath, java.lang.Integer persistentCacheSize)
static java.lang.String
printableStopwatch(org.apache.jackrabbit.guava.common.base.Stopwatch s)
static void
printMessage(java.io.PrintWriter pw, java.lang.String format, java.lang.Object... arg)
static java.lang.String
storeDescription(ToolUtils.SegmentStoreType storeType, java.lang.String pathOrUri)
static ToolUtils.SegmentStoreType
storeTypeFromPathOrUri(java.lang.String pathOrUri)
-
-
-
Method Detail
-
newFileStore
public static FileStore newFileStore(SegmentNodeStorePersistence persistence, java.io.File directory, boolean strictVersionCheck, int segmentCacheSize, long gcLogInterval, SegmentGCOptions.CompactorType compactorType) throws java.io.IOException, InvalidFileStoreVersionException
- Throws:
java.io.IOException
InvalidFileStoreVersionException
-
newFileStore
public static FileStore newFileStore(SegmentNodeStorePersistence persistence, java.io.File directory, boolean strictVersionCheck, int segmentCacheSize, long gcLogInterval, SegmentGCOptions.CompactorType compactorType, int gcConcurrency) throws java.io.IOException, InvalidFileStoreVersionException
- Throws:
java.io.IOException
InvalidFileStoreVersionException
-
newSegmentNodeStorePersistence
public static SegmentNodeStorePersistence newSegmentNodeStorePersistence(ToolUtils.SegmentStoreType storeType, java.lang.String pathOrUri, java.lang.String persistentCachePath, java.lang.Integer persistentCacheSize)
-
newSegmentNodeStorePersistence
public static SegmentNodeStorePersistence newSegmentNodeStorePersistence(ToolUtils.SegmentStoreType storeType, java.lang.String pathOrUri)
-
createArchiveManager
public static SegmentArchiveManager createArchiveManager(SegmentNodeStorePersistence persistence)
-
createCloudBlobDirectory
public static com.microsoft.azure.storage.blob.CloudBlobDirectory createCloudBlobDirectory(java.lang.String path)
-
createCloudBlobDirectory
public static com.microsoft.azure.storage.blob.CloudBlobDirectory createCloudBlobDirectory(java.lang.String path, Environment environment)
-
getStorageCredentialsFromAccountAndEnv
@NotNull public static @NotNull com.microsoft.azure.storage.StorageCredentials getStorageCredentialsFromAccountAndEnv(@NotNull @NotNull java.lang.String accountName)
-
storeTypeFromPathOrUri
public static ToolUtils.SegmentStoreType storeTypeFromPathOrUri(java.lang.String pathOrUri)
-
storeDescription
public static java.lang.String storeDescription(ToolUtils.SegmentStoreType storeType, java.lang.String pathOrUri)
-
printableStopwatch
public static java.lang.String printableStopwatch(org.apache.jackrabbit.guava.common.base.Stopwatch s)
-
printMessage
public static void printMessage(java.io.PrintWriter pw, java.lang.String format, java.lang.Object... arg)
-
fetchByteArray
public static byte[] fetchByteArray(Buffer buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
-