public class DuracloudContentWriter extends Object implements ContentWriter
| Constructor and Description |
|---|
DuracloudContentWriter(ContentStore contentStore,
String username) |
DuracloudContentWriter(ContentStore contentStore,
String username,
boolean throwOnError,
boolean jumpStart) |
DuracloudContentWriter(ContentStore contentStore,
String username,
boolean throwOnError,
boolean jumpStart,
int maxRetries,
int waitInMsBetweenRetries) |
DuracloudContentWriter(ContentStore contentStore,
String username,
int maxRetries,
int waitInMsBetweenRetries) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
errorsExist() |
int |
getMaxRetries() |
List<AddContentResult> |
getResults()
This method returns an item-by-item list of results for the write
requests.
|
void |
ignore(String spaceId,
String contentId,
long contentSize)
This method helps with the book-keeping of which files are ignored.
|
protected void |
setChecksumUtil(ChecksumUtil checksumUtil) |
ChunksManifest |
write(String spaceId,
ChunkableContent chunkable)
This method writes the ChunkableContent to the arg space.
|
ChunksManifest |
write(String spaceId,
ChunkableContent chunkable,
Map<String,String> contentProperties)
This method implements the ContentWriter interface for writing content
to a DataStore.
|
String |
writeSingle(String spaceId,
String chunkChecksum,
ChunkInputStream chunk)
This method writes the arg Chunk to the arg space.
|
String |
writeSingle(String spaceId,
String chunkChecksum,
ChunkInputStream chunk,
Map<String,String> properties)
This method writes a single chunk to the DataStore.
|
public DuracloudContentWriter(ContentStore contentStore, String username)
public DuracloudContentWriter(ContentStore contentStore, String username, int maxRetries, int waitInMsBetweenRetries)
public DuracloudContentWriter(ContentStore contentStore, String username, boolean throwOnError, boolean jumpStart)
public DuracloudContentWriter(ContentStore contentStore, String username, boolean throwOnError, boolean jumpStart, int maxRetries, int waitInMsBetweenRetries)
public int getMaxRetries()
public List<AddContentResult> getResults()
ContentWritergetResults in interface ContentWriterpublic void ignore(String spaceId, String contentId, long contentSize)
ContentWriterignore in interface ContentWriterspaceId - destination where arg content was assigned to be writtencontentId - of contentcontentSize - of contentpublic ChunksManifest write(String spaceId, ChunkableContent chunkable, Map<String,String> contentProperties) throws NotFoundException
write in interface ContentWriterspaceId - destination space of arg chunkable contentchunkable - content to be writtencontentProperties - user defined properties to be stored with chunkable contentNotFoundException - if space is not foundprotected boolean errorsExist()
protected void setChecksumUtil(ChecksumUtil checksumUtil)
public ChunksManifest write(String spaceId, ChunkableContent chunkable) throws NotFoundException
ContentWriterwrite in interface ContentWriterspaceId - destination where arg chunkable content will be writtenchunkable - content to be writtenNotFoundException - on errorpublic String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk, Map<String,String> properties) throws NotFoundException
writeSingle in interface ContentWriterspaceId - 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 contentNotFoundException - if space is not foundpublic String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk) throws NotFoundException
ContentWriterwriteSingle in interface ContentWriterspaceId - destination where arg chunk content will be writtenchunkChecksum - md5 checksum of the chunk if known, null otherwisechunk - content to be writtenNotFoundException - on errorCopyright © 2009–2017 DuraSpace. All rights reserved.