|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.smila.binarystorage.persistence.BinaryPersistence
org.eclipse.smila.binarystorage.internal.NilBinaryPersistenceImpl
public class NilBinaryPersistenceImpl
implementation that will not store anything and hence returns always 0 length content which can be used for lightweight testing.
Constructor Summary | |
---|---|
NilBinaryPersistenceImpl(BinaryStorageConfiguration binaryStorageConfig)
|
Method Summary | |
---|---|
void |
cleanup()
Release resources and performs cleanup actions. |
void |
deleteBinary(java.lang.String key)
Delete binary data by key from binary storage. |
long |
fetchSize(java.lang.String key)
Fetch record size. |
byte[] |
loadBinaryAsByteArray(java.lang.String key)
Fetch binary data by key from binary storage. |
java.io.InputStream |
loadBinaryAsInputStream(java.lang.String key)
Fetch binary data by key from binary storage. |
void |
storeBinary(java.lang.String key,
byte[] content)
Store binary data in binary storage. |
void |
storeBinary(java.lang.String key,
java.io.InputStream stream)
Store binary data in binary storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NilBinaryPersistenceImpl(BinaryStorageConfiguration binaryStorageConfig) throws BinaryStorageException
BinaryStorageException
Method Detail |
---|
public void cleanup() throws BinaryStorageException
cleanup
in class BinaryPersistence
BinaryStorageException
- in case of any exceptionBinaryPersistence.cleanup()
public void deleteBinary(java.lang.String key) throws BinaryStorageException
deleteBinary
in class BinaryPersistence
key
- String - unique identifier inside of binary storage
BinaryStorageException
- -
in case of any exception occursBinaryPersistence.deleteBinary(java.lang.String)
public long fetchSize(java.lang.String key) throws BinaryStorageException
fetchSize
in class BinaryPersistence
key
- String - unique identifier inside of binary storage
BinaryStorageException
- - in case of any exception occursBinaryPersistence.fetchSize(java.lang.String)
public byte[] loadBinaryAsByteArray(java.lang.String key) throws BinaryStorageException
loadBinaryAsByteArray
in class BinaryPersistence
key
- String - unique identifier inside of binary storage
BinaryStorageException
- -
in case of any exception occursBinaryPersistence.loadBinaryAsByteArray(java.lang.String)
public java.io.InputStream loadBinaryAsInputStream(java.lang.String key) throws BinaryStorageException
loadBinaryAsInputStream
in class BinaryPersistence
key
- String - unique identifier inside of binary storage
BinaryStorageException
- -
in case of any exception occursBinaryPersistence.loadBinaryAsInputStream(java.lang.String)
public void storeBinary(java.lang.String key, java.io.InputStream stream) throws BinaryStorageException
storeBinary
in class BinaryPersistence
key
- String - unique identifier inside of binary storagestream
- InputStream - binary data input stream
BinaryStorageException
- -
in case of any exception occursBinaryPersistence.storeBinary(java.lang.String,
java.io.InputStream)
public void storeBinary(java.lang.String key, byte[] content) throws BinaryStorageException
storeBinary
in class BinaryPersistence
key
- String - unique identifier inside of binary storagecontent
- byte[] - binary content
BinaryStorageException
- -
in case of any exception occursBinaryPersistence.storeBinary(java.lang.String, byte[])
|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |