Class DefaultSplitBlobStore
java.lang.Object
org.apache.jackrabbit.oak.spi.blob.split.DefaultSplitBlobStore
- All Implemented Interfaces:
AutoCloseable,BlobStore,SplitBlobStore
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSplitBlobStore(String repositoryDir, BlobStore oldBlobStore, BlobStore newBlobStore) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the blobId that referred by the given binary reference.longgetBlobLength(String blobId) Get the length of the blob.getInputStream(String blobId) Returns a new stream for given blobId.getReference(String blobId) Returns a secure reference to blob referred by blobid, ornullif no such reference is available.booleanisMigrated(String blobId) intRead a number of bytes from a blob.toString()writeBlob(InputStream in) Write a blob from an input stream.writeBlob(InputStream in, BlobOptions options) Ignores the options provided and delegates towriteBlob(InputStream).
-
Constructor Details
-
DefaultSplitBlobStore
-
-
Method Details
-
isMigrated
- Specified by:
isMigratedin interfaceSplitBlobStore- Throws:
IOException
-
writeBlob
Description copied from interface:BlobStoreWrite a blob from an input stream. This method closes the input stream.- Specified by:
writeBlobin interfaceBlobStore- Parameters:
in- the input stream- Returns:
- the blob id
- Throws:
IOException
-
writeBlob
Ignores the options provided and delegates towriteBlob(InputStream).- Specified by:
writeBlobin interfaceBlobStore- Parameters:
in- the input stream to writeoptions- the options to use- Returns:
- Throws:
IOException
-
readBlob
Description copied from interface:BlobStoreRead a number of bytes from a blob.- Specified by:
readBlobin interfaceBlobStore- Parameters:
blobId- the blob idpos- the position within the blobbuff- the target byte arrayoff- the offset within the target arraylength- the number of bytes to read- Returns:
- the number of bytes read
- Throws:
IOException
-
getBlobLength
Description copied from interface:BlobStoreGet the length of the blob.- Specified by:
getBlobLengthin interfaceBlobStore- Parameters:
blobId- the blob id- Returns:
- the length
- Throws:
IOException
-
getInputStream
Description copied from interface:BlobStoreReturns a new stream for given blobId. The streams returned from multiple calls to this method are byte wise equals. That is, subsequent calls toreadreturn the same sequence of bytes as long as neither call throws an exception.- Specified by:
getInputStreamin interfaceBlobStore- Parameters:
blobId- the blob id- Returns:
- a new stream for given blobId
- Throws:
IOException
-
getBlobId
Description copied from interface:BlobStoreReturns the blobId that referred by the given binary reference. Returnsnullif the reference is invalid, for example if it points to a blob that does not exist. -
getReference
Description copied from interface:BlobStoreReturns a secure reference to blob referred by blobid, ornullif no such reference is available.- Specified by:
getReferencein interfaceBlobStore- Parameters:
blobId- blobId referring the blob for which reference is required- Returns:
- binary reference, or
null
-
toString
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-