Package org.apache.storm.blobstore
Class BlobStoreFile
- java.lang.Object
-
- org.apache.storm.blobstore.BlobStoreFile
-
- Direct Known Subclasses:
HdfsBlobStoreFile,LocalFsBlobStoreFile
public abstract class BlobStoreFile extends Object
Provides an base implementation for creating a blobstore based on file backed storage.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBLOBSTORE_DATA_FILEstatic org.slf4j.LoggerLOGprotected static StringTMP_EXTprotected static PatternTMP_NAME_PATTERN
-
Constructor Summary
Constructors Constructor Description BlobStoreFile()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcancel()abstract voidcommit()abstract voiddelete()abstract longgetFileLength()abstract InputStreamgetInputStream()abstract StringgetKey()abstract SettableBlobMetagetMetadata()abstract longgetModTime()abstract OutputStreamgetOutputStream()longgetVersion()abstract booleanisTmp()abstract voidsetMetadata(SettableBlobMeta meta)
-
-
-
Field Detail
-
LOG
public static final org.slf4j.Logger LOG
-
TMP_EXT
protected static final String TMP_EXT
- See Also:
- Constant Field Values
-
TMP_NAME_PATTERN
protected static final Pattern TMP_NAME_PATTERN
-
BLOBSTORE_DATA_FILE
protected static final String BLOBSTORE_DATA_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
delete
public abstract void delete() throws IOException- Throws:
IOException
-
getKey
public abstract String getKey()
-
isTmp
public abstract boolean isTmp()
-
getMetadata
public abstract SettableBlobMeta getMetadata()
-
setMetadata
public abstract void setMetadata(SettableBlobMeta meta)
-
getModTime
public abstract long getModTime() throws IOException- Throws:
IOException
-
getVersion
public long getVersion() throws IOException- Throws:
IOException
-
getInputStream
public abstract InputStream getInputStream() throws IOException
- Throws:
IOException
-
getOutputStream
public abstract OutputStream getOutputStream() throws IOException
- Throws:
IOException
-
commit
public abstract void commit() throws IOException- Throws:
IOException
-
cancel
public abstract void cancel() throws IOException- Throws:
IOException
-
getFileLength
public abstract long getFileLength() throws IOException- Throws:
IOException
-
-