org.fcrepo.server.journal.readerwriter.multicast
Class JournalEntrySizeEstimator
java.lang.Object
org.fcrepo.server.journal.readerwriter.multicast.JournalEntrySizeEstimator
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.
- Version:
- $Id: JournalEntrySizeEstimator.java,v 1.3 2007/06/01 17:21:31 jblake
Exp $
- Author:
- jblake
|
Method Summary |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JournalEntrySizeEstimator
public JournalEntrySizeEstimator(MulticastJournalWriter journalWriter)
estimateSize
public long estimateSize(JournalEntry journalEntry)
throws JournalException
- Create a modified entry, minus any file arguments, and ask the
JournalWriter to format it so we can check the size. The size of the
file(s) can be determined separately.
- Throws:
JournalException
Copyright © 2012 DuraSpace. All Rights Reserved.