org.duracloud.chunk.writer
Interface ContentWriter

All Known Implementing Classes:
DuracloudContentWriter, FilesystemContentWriter

public interface ContentWriter

Author:
Andrew Woods Date: Feb 5, 2010

Method Summary
 java.util.List<AddContentResult> getResults()
          This method returns an item-by-item list of results for the write requests.
 void ignore(java.lang.String spaceId, java.lang.String contentId, long contentSize)
          This method helps with the book-keeping of which files are ignored.
 ChunksManifest write(java.lang.String spaceId, ChunkableContent chunkable)
          This method writes the ChunkableContent to the arg space.
 java.lang.String writeSingle(java.lang.String spaceId, java.lang.String chunkChecksum, ChunkInputStream chunk)
          This method writes the arg Chunk to the arg space.
 

Method Detail

write

ChunksManifest write(java.lang.String spaceId,
                     ChunkableContent chunkable)
                     throws NotFoundException
This method writes the ChunkableContent to the arg space.

Parameters:
spaceId - destination where arg chunkable content will be written
chunkable - content to be written
Returns:
ChunksManifest of written content
Throws:
NotFoundException - on error

writeSingle

java.lang.String writeSingle(java.lang.String spaceId,
                             java.lang.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 written
chunkChecksum - md5 checksum of the chunk if known, null otherwise
chunk - content to be written
Returns:
MD5 of content
Throws:
NotFoundException - on error

ignore

void ignore(java.lang.String spaceId,
            java.lang.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 written
contentId - of content
contentSize - of content

getResults

java.util.List<AddContentResult> getResults()
This method returns an item-by-item list of results for the write requests.

Returns:
List of results


Copyright © 2009-2010 DuraSpace. All Rights Reserved.