org.fcrepo.server.journal.readerwriter.multicast
Class JournalEntrySizeEstimator

java.lang.Object
  extended by 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

Constructor Summary
JournalEntrySizeEstimator(MulticastJournalWriter journalWriter)
           
 
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
 

Constructor Detail

JournalEntrySizeEstimator

public JournalEntrySizeEstimator(MulticastJournalWriter journalWriter)
Method Detail

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 © 2011 DuraSpace. All Rights Reserved.