Package org.duracloud.chunk.writer
Interface ContentWriter
-
- All Known Implementing Classes:
DuracloudContentWriter,FilesystemContentWriter
public interface ContentWriter- Author:
- Andrew Woods Date: Feb 5, 2010
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<AddContentResult>getResults()This method returns an item-by-item list of results for the write requests.voidignore(String spaceId, String contentId, long contentSize)This method helps with the book-keeping of which files are ignored.ChunksManifestwrite(String spaceId, ChunkableContent chunkable)This method writes the ChunkableContent to the arg space.ChunksManifestwrite(String spaceId, ChunkableContent chunkable, Map<String,String> contentProperties)This method writes the ChunkableContent to the arg space.StringwriteSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk)This method writes the arg Chunk to the arg space.StringwriteSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk, Map<String,String> properties)This method writes the arg Chunk to the arg space.
-
-
-
Method Detail
-
write
ChunksManifest write(String spaceId, ChunkableContent chunkable) throws NotFoundException
This method writes the ChunkableContent to the arg space.- Parameters:
spaceId- destination where arg chunkable content will be writtenchunkable- content to be written- Returns:
- ChunksManifest of written content
- Throws:
NotFoundException- on error
-
write
ChunksManifest write(String spaceId, ChunkableContent chunkable, Map<String,String> contentProperties) throws NotFoundException
This method writes the ChunkableContent to the arg space.- Parameters:
spaceId- destination where arg chunkable content will be writtenchunkable- content to be writtencontentProperties- user defined properties to be stored with chunkable content- Returns:
- ChunksManifest of written content
- Throws:
NotFoundException- on error
-
writeSingle
String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk, Map<String,String> properties) throws NotFoundException
This method writes the arg Chunk to the arg space. It is intended for use when when the arg chunk is actually a complete piece of content- Parameters:
spaceId- destination where arg chunk content will be writtenchunkChecksum- md5 checksum of the chunk if known, null otherwisechunk- content to be writtenproperties- user-defined properties for the content- Returns:
- MD5 of content
- Throws:
NotFoundException- on error
-
writeSingle
String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk) throws NotFoundException
This method writes the arg Chunk to the arg space. It is intended for use when when the arg chunk is actually a complete piece of content- Parameters:
spaceId- destination where arg chunk content will be writtenchunkChecksum- md5 checksum of the chunk if known, null otherwisechunk- content to be writtenproperties- user-defined properties for the content- Returns:
- MD5 of content
- Throws:
NotFoundException- on error
-
ignore
void ignore(String spaceId, String contentId, long contentSize)
This method helps with the book-keeping of which files are ignored.- Parameters:
spaceId- destination where arg content was assigned to be writtencontentId- of contentcontentSize- of content
-
getResults
List<AddContentResult> getResults()
This method returns an item-by-item list of results for the write requests.- Returns:
- List of results
-
-