public class WrappingSplitBlobStore extends java.lang.Object implements BlobStoreWrapper, SplitBlobStore
Constructor and Description |
---|
WrappingSplitBlobStore(java.lang.String repositoryDir,
BlobStore newBlobStore) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.String |
getBlobId(java.lang.String reference)
Returns the blobId that referred by the given binary reference.
|
long |
getBlobLength(java.lang.String blobId)
Get the length of the blob.
|
java.io.InputStream |
getInputStream(java.lang.String blobId)
Returns a new stream for given blobId.
|
java.lang.String |
getReference(java.lang.String blobId)
Returns a secure reference to blob referred by blobid, or
null if no such
reference is available. |
boolean |
isMigrated(java.lang.String blobId) |
int |
readBlob(java.lang.String blobId,
long pos,
byte[] buff,
int off,
int length)
Read a number of bytes from a blob.
|
void |
setBlobStore(BlobStore blobStore) |
java.lang.String |
writeBlob(java.io.InputStream in)
Write a blob from an input stream.
|
java.lang.String |
writeBlob(java.io.InputStream in,
BlobOptions options)
Ignores the options provided and delegates to
writeBlob(InputStream) . |
public WrappingSplitBlobStore(java.lang.String repositoryDir, BlobStore newBlobStore)
public void setBlobStore(BlobStore blobStore)
setBlobStore
in interface BlobStoreWrapper
public java.lang.String writeBlob(java.io.InputStream in) throws java.io.IOException
BlobStore
public java.lang.String writeBlob(java.io.InputStream in, BlobOptions options) throws java.io.IOException
writeBlob(InputStream)
.public int readBlob(java.lang.String blobId, long pos, byte[] buff, int off, int length) throws java.io.IOException
BlobStore
public long getBlobLength(java.lang.String blobId) throws java.io.IOException
BlobStore
getBlobLength
in interface BlobStore
blobId
- the blob idjava.io.IOException
public java.io.InputStream getInputStream(java.lang.String blobId) throws java.io.IOException
BlobStore
read
return the same sequence of bytes as long as neither call throws
an exception.getInputStream
in interface BlobStore
blobId
- the blob idjava.io.IOException
public java.lang.String getBlobId(java.lang.String reference)
BlobStore
null
if the reference is invalid, for example if it
points to a blob that does not exist.public java.lang.String getReference(java.lang.String blobId)
BlobStore
null
if no such
reference is available.getReference
in interface BlobStore
blobId
- blobId referring the blob for which reference is requirednull
public boolean isMigrated(java.lang.String blobId) throws java.io.IOException
isMigrated
in interface SplitBlobStore
java.io.IOException
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
Copyright © 2010 - 2020 Adobe. All Rights Reserved