public class DefaultIoEventSizeEstimator extends java.lang.Object implements IoEventSizeEstimator
IoEventSizeEstimator
implementation.
Martin's Java Notes was used for estimation. For unknown types, it inspects declaring fields of the class of the specified event and the parameter of the event. The size of unknown declaring fields are approximated to the specified averageSizePerField (default: 64).
All the estimated sizes of classes are cached for performance improvement.
Constructor and Description |
---|
DefaultIoEventSizeEstimator() |
Modifier and Type | Method and Description |
---|---|
int |
estimateSize(IoEvent event) |
int |
estimateSize(java.lang.Object message) |
public int estimateSize(IoEvent event)
estimateSize
in interface IoEventSizeEstimator
public int estimateSize(java.lang.Object message)
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.