public class JournalEntrySizeEstimator extends Object
Title: JournalEntrySizeEstimator.java
Description: The easiest, simplest, most maintainable way to estimate the size of a formatted JournalEntry is to just have the JournalWriter format it. We save some work and avoid memory overflow issues by removing any data files from the entry before formatting: we know how big the files will be when encoded.
| Constructor and Description |
|---|
JournalEntrySizeEstimator(MulticastJournalWriter journalWriter) |
| Modifier and Type | Method and Description |
|---|---|
long |
estimateSize(JournalEntry journalEntry)
Create a modified entry, minus any file arguments, and ask the
JournalWriter to format it so we can check the size.
|
public JournalEntrySizeEstimator(MulticastJournalWriter journalWriter)
public long estimateSize(JournalEntry journalEntry) throws JournalException
JournalExceptionCopyright © 2013 DuraSpace. All Rights Reserved.