@NotThreadSafe public final class BackupDocumentWriter extends Object
Document
instances to one or more sequential files in a backup directory.Modifier and Type | Field and Description |
---|---|
protected long |
count |
static String |
DOCUMENTS_EXTENSION |
protected long |
fileCount |
static String |
GZIP_EXTENSION |
protected long |
maxDocumentsPerFile |
protected OutputStream |
stream |
protected long |
totalCount |
Constructor and Description |
---|
BackupDocumentWriter(File parentDirectory,
String filenamePrefix,
long documentsPerFile,
boolean compress,
Problems problems) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this writer, which flushes and closes any currently-open streams.
|
long |
getDocumentCount()
Return the number of documents that have been written so far.
|
long |
getFileCount()
Return the number of files that have been written so far.
|
void |
write(Document document)
Append the supplied document to the files.
|
public static final String GZIP_EXTENSION
public static final String DOCUMENTS_EXTENSION
protected final long maxDocumentsPerFile
protected OutputStream stream
protected long count
protected long totalCount
protected long fileCount
public void write(Document document)
document
- the document to be written; may not be nullpublic void close()
public long getDocumentCount()
public long getFileCount()
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.