public class FileSummary extends java.lang.Object implements Loggable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
int |
maxLNSize |
int |
obsoleteINCount |
int |
obsoleteLNCount |
int |
obsoleteLNSize |
int |
obsoleteLNSizeCounted |
int |
totalCount |
int |
totalINCount |
int |
totalINSize |
int |
totalLNCount |
int |
totalLNSize |
int |
totalSize |
Constructor and Description |
---|
FileSummary()
Creates an empty summary.
|
Modifier and Type | Method and Description |
---|---|
void |
add(FileSummary o)
Add the totals of the given summary object to the totals of this object.
|
FileSummary |
clone() |
void |
dumpLog(java.lang.StringBuilder buf,
boolean verbose)
Write the object into the string buffer for log dumping.
|
float |
getAvgObsoleteLNSizeNotCounted()
Returns the average size for LNs with sizes not counted, or NaN if
there are no such LNs.
|
int |
getEntriesCounted()
Returns the total number of entries counted.
|
int |
getLogSize() |
int |
getMaxObsoleteLNSize()
Returns the maximum possible obsolete LN size, using the maximum LN size
for LN sizes that were not counted.
|
int |
getMaxObsoleteSize()
Returns an estimate of the total bytes that are obsolete, using
getMaxObsoleteLNSize instead of getObsoleteLNSize.
|
int |
getNonObsoleteCount()
Returns the number of non-obsolete LN and IN entries.
|
int |
getObsoleteINSize()
Returns the approximate byte size of all obsolete IN entries.
|
int |
getObsoleteLNSize()
Returns the approximate byte size of all obsolete LN entries, using the
default average LN size for LN sizes that were not counted.
|
int |
getObsoleteLNSize(float obsoleteLNSizeCorrectionFactor)
Returns the approximate byte size of all obsolete LN entries, using the
given average LN size for LN sizes that were not counted.
|
int |
getObsoleteSize()
Returns an estimate of the total bytes that are obsolete, using
getObsoleteLNSize instead of getMaxObsoleteLNSize.
|
int |
getObsoleteSize(float obsoleteLNSizeCorrectionFactor)
Returns an estimate of the total bytes that are obsolete, using a given
correction factor for LN sizes that were not counted.
|
long |
getTransactionId()
Never called.
|
boolean |
isEmpty()
Returns whether this summary contains any non-zero totals.
|
boolean |
logicalEquals(Loggable other) |
void |
readFromLog(java.nio.ByteBuffer buf,
int entryVersion)
Initialize this object from the data in itemBuf.
|
void |
reset()
Reset all totals to zero.
|
java.lang.String |
toString() |
int |
utilization()
Calculates utilization percentage using average LN sizes.
|
int |
utilization(float obsoleteLNSizeCorrectionFactor)
Calculates utilization percentage using average LN sizes, using a given
correction factor for LN sizes that were not counted.
|
static int |
utilization(long obsoleteSize,
long totalSize)
Calculates a utilization percentage.
|
void |
writeToLog(java.nio.ByteBuffer buf)
Serialize this object into the buffer.
|
public int totalCount
public int totalSize
public int totalINCount
public int totalINSize
public int totalLNCount
public int totalLNSize
public int maxLNSize
public int obsoleteINCount
public int obsoleteLNCount
public int obsoleteLNSize
public int obsoleteLNSizeCounted
public FileSummary clone()
clone
in class java.lang.Object
public boolean isEmpty()
public int getObsoleteLNSize()
public int getObsoleteLNSize(float obsoleteLNSizeCorrectionFactor)
obsoleteLNSizeCorrectionFactor
- is the correction factor to use
for uncounted LNs, or NaN to use the default average size calculation.public float getAvgObsoleteLNSizeNotCounted()
public int getMaxObsoleteLNSize()
public int getObsoleteINSize()
public int getObsoleteSize()
public int getObsoleteSize(float obsoleteLNSizeCorrectionFactor)
public int getMaxObsoleteSize()
public int getEntriesCounted()
public int getNonObsoleteCount()
public int utilization()
public int utilization(float obsoleteLNSizeCorrectionFactor)
public static int utilization(long obsoleteSize, long totalSize)
public void reset()
public void add(FileSummary o)
public int getLogSize()
getLogSize
in interface Loggable
Loggable.getLogSize()
public void writeToLog(java.nio.ByteBuffer buf)
Loggable
writeToLog
in interface Loggable
buf
- is the destination bufferLoggable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(java.nio.ByteBuffer buf, int entryVersion)
Loggable
readFromLog
in interface Loggable
Loggable.readFromLog(java.nio.ByteBuffer, int)
public void dumpLog(java.lang.StringBuilder buf, boolean verbose)
Loggable
dumpLog
in interface Loggable
buf
- destination string bufferverbose
- if true, dump the full, verbose versionLoggable.dumpLog(java.lang.StringBuilder, boolean)
public long getTransactionId()
getTransactionId
in interface Loggable
Loggable.getTransactionId()
public boolean logicalEquals(Loggable other)
logicalEquals
in interface Loggable
Always return false, this item should never be compared.
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2004-2012 Oracle. All rights reserved.