Class SizeOfPdfStatisticsAggregator
- java.lang.Object
-
- com.itextpdf.commons.actions.AbstractStatisticsAggregator
-
- com.itextpdf.kernel.pdf.statistics.SizeOfPdfStatisticsAggregator
-
public class SizeOfPdfStatisticsAggregator extends AbstractStatisticsAggregator
Statistics aggregator which aggregates size of PDF documents.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Long,java.lang.String>DOCUMENT_SIZESprivate java.lang.Objectlockprivate static longMEASURE_COEFFICIENTprivate java.util.Map<java.lang.String,java.lang.Long>numberOfDocumentsprivate static longSIZE_128KBprivate static longSIZE_128MBprivate static longSIZE_16MBprivate static longSIZE_1MBprivate static java.util.List<java.lang.Long>SORTED_UPPER_BOUNDS_OF_SIZESprivate static java.lang.StringSTRING_FOR_128KBprivate static java.lang.StringSTRING_FOR_128MBprivate static java.lang.StringSTRING_FOR_16MBprivate static java.lang.StringSTRING_FOR_1MBprivate static java.lang.StringSTRING_FOR_INF
-
Constructor Summary
Constructors Constructor Description SizeOfPdfStatisticsAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaggregate(AbstractStatisticsEvent event)Aggregates size of the PDF document from the provided event.voidmerge(AbstractStatisticsAggregator aggregator)Merges data about amounts of ranges of document sizes from the provided aggregator into this aggregator.java.lang.ObjectretrieveAggregation()Retrieves Map where keys are ranges of document sizes and values are the amounts of such PDF documents.
-
-
-
Field Detail
-
MEASURE_COEFFICIENT
private static final long MEASURE_COEFFICIENT
- See Also:
- Constant Field Values
-
SIZE_128KB
private static final long SIZE_128KB
- See Also:
- Constant Field Values
-
SIZE_1MB
private static final long SIZE_1MB
- See Also:
- Constant Field Values
-
SIZE_16MB
private static final long SIZE_16MB
- See Also:
- Constant Field Values
-
SIZE_128MB
private static final long SIZE_128MB
- See Also:
- Constant Field Values
-
STRING_FOR_128KB
private static final java.lang.String STRING_FOR_128KB
- See Also:
- Constant Field Values
-
STRING_FOR_1MB
private static final java.lang.String STRING_FOR_1MB
- See Also:
- Constant Field Values
-
STRING_FOR_16MB
private static final java.lang.String STRING_FOR_16MB
- See Also:
- Constant Field Values
-
STRING_FOR_128MB
private static final java.lang.String STRING_FOR_128MB
- See Also:
- Constant Field Values
-
STRING_FOR_INF
private static final java.lang.String STRING_FOR_INF
- See Also:
- Constant Field Values
-
DOCUMENT_SIZES
private static final java.util.Map<java.lang.Long,java.lang.String> DOCUMENT_SIZES
-
SORTED_UPPER_BOUNDS_OF_SIZES
private static final java.util.List<java.lang.Long> SORTED_UPPER_BOUNDS_OF_SIZES
-
lock
private final java.lang.Object lock
-
numberOfDocuments
private final java.util.Map<java.lang.String,java.lang.Long> numberOfDocuments
-
-
Method Detail
-
aggregate
public void aggregate(AbstractStatisticsEvent event)
Aggregates size of the PDF document from the provided event.- Specified by:
aggregatein classAbstractStatisticsAggregator- Parameters:
event-SizeOfPdfStatisticsEventinstance
-
retrieveAggregation
public java.lang.Object retrieveAggregation()
Retrieves Map where keys are ranges of document sizes and values are the amounts of such PDF documents.- Specified by:
retrieveAggregationin classAbstractStatisticsAggregator- Returns:
- aggregated
Map
-
merge
public void merge(AbstractStatisticsAggregator aggregator)
Merges data about amounts of ranges of document sizes from the provided aggregator into this aggregator.- Specified by:
mergein classAbstractStatisticsAggregator- Parameters:
aggregator-SizeOfPdfStatisticsAggregatorfrom which data will be taken.
-
-