public class DefaultSplitBlobStore extends Object implements SplitBlobStore
| Constructor and Description |
|---|
DefaultSplitBlobStore(String repositoryDir,
BlobStore oldBlobStore,
BlobStore newBlobStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getBlobId(String reference)
Returns the blobId that referred by the given binary reference.
|
long |
getBlobLength(String blobId)
Get the length of the blob.
|
InputStream |
getInputStream(String blobId)
Returns a new stream for given blobId.
|
String |
getReference(String blobId)
Returns a secure reference to blob referred by blobid, or
null if no such
reference is available. |
boolean |
isMigrated(String blobId) |
int |
readBlob(String blobId,
long pos,
byte[] buff,
int off,
int length)
Read a number of bytes from a blob.
|
String |
toString() |
String |
writeBlob(InputStream in)
Write a blob from an input stream.
|
String |
writeBlob(InputStream in,
BlobOptions options)
Ignores the options provided and delegates to
writeBlob(InputStream). |
public boolean isMigrated(String blobId) throws IOException
isMigrated in interface SplitBlobStoreIOExceptionpublic String writeBlob(InputStream in) throws IOException
BlobStorewriteBlob in interface BlobStorein - the input streamIOExceptionpublic String writeBlob(InputStream in, BlobOptions options) throws IOException
writeBlob(InputStream).writeBlob in interface BlobStorein - the input stream to writeoptions - the options to useIOExceptionpublic int readBlob(String blobId, long pos, byte[] buff, int off, int length) throws IOException
BlobStorereadBlob in interface BlobStoreblobId - the blob idpos - the position within the blobbuff - the target byte arrayoff - the offset within the target arraylength - the number of bytes to readIOExceptionpublic long getBlobLength(String blobId) throws IOException
BlobStoregetBlobLength in interface BlobStoreblobId - the blob idIOExceptionpublic InputStream getInputStream(String blobId) throws IOException
BlobStoreread
return the same sequence of bytes as long as neither call throws
an exception.getInputStream in interface BlobStoreblobId - the blob idIOExceptionpublic String getBlobId(String reference)
BlobStorenull if the reference is invalid, for example if it
points to a blob that does not exist.public String getReference(String blobId)
BlobStorenull if no such
reference is available.getReference in interface BlobStoreblobId - blobId referring the blob for which reference is requirednullpublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved