The following system properties can be set to limit the size of bytes, strings and collection types to be allocated:
MAX_ARRAY_VM_LIMIT.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | MAX_ARRAY_VM_LIMIT
The maximum length of array to allocate (unless necessary). |
| public static final String | |
| public static final String | |
| public static final String | |
| private static int | |
| private static int | |
| private static int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: The size of the bytes if and only if it is within the limit and non-negative.The proposed size of the bytes to read length)Check to ensure that reading the bytes is within the specified limits. |
| public static int | Returns: The total number of items in the collection if and only if it is within the limit and non-negative.The number of elements items read in the collection existing, long The next number of items to read. In normal usage, this is
always a positive, permitted value. Negative and zero values
have a special meaning in Avro decoding. items)Check to ensure that reading the specified number of items remains within the specified limits. |
| public static int | Returns: The size of the string if and only if it is within the limit and non-negative.The proposed size of the string to read length)Check to ensure that reading the string size is within the specified limits. |
| private static int | Returns: The value from the system propertyThe system property to fetch property, int The value to use if the system property is not present or
parsable as an int defaultValue)Get an integer value stored in a system property, used to configure the system behaviour of decoders |
| pack-priv static void |
| MAX_ARRAY_VM_LIMIT | back to summary |
|---|---|
| pack-priv static final int MAX_ARRAY_VM_LIMIT The maximum length of array to allocate (unless necessary). Some VMs reserve
some header words in an array. Attempts to allocate larger arrays may result
in
| |
| MAX_BYTES_LENGTH_PROPERTY | back to summary |
|---|---|
| public static final String MAX_BYTES_LENGTH_PROPERTY | |
| MAX_COLLECTION_LENGTH_PROPERTY | back to summary |
|---|---|
| public static final String MAX_COLLECTION_LENGTH_PROPERTY | |
| MAX_STRING_LENGTH_PROPERTY | back to summary |
|---|---|
| public static final String MAX_STRING_LENGTH_PROPERTY | |
| maxBytesLength | back to summary |
|---|---|
| private static int maxBytesLength | |
| maxCollectionLength | back to summary |
|---|---|
| private static int maxCollectionLength | |
| maxStringLength | back to summary |
|---|---|
| private static int maxStringLength | |
| SystemLimitException | back to summary |
|---|---|
| public SystemLimitException(String message) | |
| checkMaxBytesLength | back to summary |
|---|---|
| public static int checkMaxBytesLength(long length) Check to ensure that reading the bytes is within the specified limits.
| |
| checkMaxCollectionLength | back to summary |
|---|---|
| public static int checkMaxCollectionLength(long existing, long items) Check to ensure that reading the specified number of items remains within the specified limits.
| |
| checkMaxStringLength | back to summary |
|---|---|
| public static int checkMaxStringLength(long length) Check to ensure that reading the string size is within the specified limits.
| |
| getLimitFromProperty | back to summary |
|---|---|
| private static int getLimitFromProperty(String property, int defaultValue) Get an integer value stored in a system property, used to configure the system behaviour of decoders
| |
| resetLimits | back to summary |
|---|---|
| pack-priv static void resetLimits() Reread the limits from the system properties. | |