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_SIZES
private java.lang.Object
lock
private static long
MEASURE_COEFFICIENT
private java.util.Map<java.lang.String,java.lang.Long>
numberOfDocuments
private static long
SIZE_128KB
private static long
SIZE_128MB
private static long
SIZE_16MB
private static long
SIZE_1MB
private static java.util.List<java.lang.Long>
SORTED_UPPER_BOUNDS_OF_SIZES
private static java.lang.String
STRING_FOR_128KB
private static java.lang.String
STRING_FOR_128MB
private static java.lang.String
STRING_FOR_16MB
private static java.lang.String
STRING_FOR_1MB
private static java.lang.String
STRING_FOR_INF
-
Constructor Summary
Constructors Constructor Description SizeOfPdfStatisticsAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
aggregate(AbstractStatisticsEvent event)
Aggregates size of the PDF document from the provided event.void
merge(AbstractStatisticsAggregator aggregator)
Merges data about amounts of ranges of document sizes from the provided aggregator into this aggregator.java.lang.Object
retrieveAggregation()
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:
aggregate
in classAbstractStatisticsAggregator
- Parameters:
event
-SizeOfPdfStatisticsEvent
instance
-
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:
retrieveAggregation
in 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:
merge
in classAbstractStatisticsAggregator
- Parameters:
aggregator
-SizeOfPdfStatisticsAggregator
from which data will be taken.
-
-