Class ToolUtils
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.azure.tool.ToolUtils
-
public class ToolUtils extends Object
Utility class for common stuff pertaining to tooling.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classToolUtils.SegmentStoreType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManagercreateArchiveManager(org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence persistence)static com.microsoft.azure.storage.blob.CloudBlobDirectorycreateCloudBlobDirectory(String path)static byte[]fetchByteArray(org.apache.jackrabbit.oak.commons.Buffer buffer)static org.apache.jackrabbit.oak.segment.file.FileStorenewFileStore(org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence persistence, File directory, boolean strictVersionCheck, int segmentCacheSize, long gcLogInterval)static org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistencenewSegmentNodeStorePersistence(ToolUtils.SegmentStoreType storeType, String pathOrUri)static StringprintableStopwatch(Stopwatch s)static voidprintMessage(PrintWriter pw, String format, Object... arg)static StringstoreDescription(ToolUtils.SegmentStoreType storeType, String pathOrUri)static ToolUtils.SegmentStoreTypestoreTypeFromPathOrUri(String pathOrUri)
-
-
-
Method Detail
-
newFileStore
public static org.apache.jackrabbit.oak.segment.file.FileStore newFileStore(org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence persistence, File directory, boolean strictVersionCheck, int segmentCacheSize, long gcLogInterval) throws IOException, org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException, URISyntaxException, com.microsoft.azure.storage.StorageException- Throws:
IOExceptionorg.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionExceptionURISyntaxExceptioncom.microsoft.azure.storage.StorageException
-
newSegmentNodeStorePersistence
public static org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence newSegmentNodeStorePersistence(ToolUtils.SegmentStoreType storeType, String pathOrUri)
-
createArchiveManager
public static org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager createArchiveManager(org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence persistence)
-
createCloudBlobDirectory
public static com.microsoft.azure.storage.blob.CloudBlobDirectory createCloudBlobDirectory(String path)
-
storeTypeFromPathOrUri
public static ToolUtils.SegmentStoreType storeTypeFromPathOrUri(String pathOrUri)
-
storeDescription
public static String storeDescription(ToolUtils.SegmentStoreType storeType, String pathOrUri)
-
printMessage
public static void printMessage(PrintWriter pw, String format, Object... arg)
-
fetchByteArray
public static byte[] fetchByteArray(org.apache.jackrabbit.oak.commons.Buffer buffer) throws IOException- Throws:
IOException
-
-