public class SystemLimitException extends AvroRuntimeException
MAX_ARRAY_VM_LIMIT
.Modifier and Type | Field and Description |
---|---|
static String |
MAX_BYTES_LENGTH_PROPERTY |
static String |
MAX_COLLECTION_LENGTH_PROPERTY |
static String |
MAX_STRING_LENGTH_PROPERTY |
Constructor and Description |
---|
SystemLimitException(String message) |
Modifier and Type | Method and Description |
---|---|
static int |
checkMaxBytesLength(long length)
Check to ensure that reading the bytes is within the specified limits.
|
static int |
checkMaxCollectionLength(long existing,
long items)
Check to ensure that reading the specified number of items remains within the
specified limits.
|
static int |
checkMaxStringLength(long length)
Check to ensure that reading the string size is within the specified limits.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final String MAX_BYTES_LENGTH_PROPERTY
public static final String MAX_COLLECTION_LENGTH_PROPERTY
public static final String MAX_STRING_LENGTH_PROPERTY
public SystemLimitException(String message)
public static int checkMaxBytesLength(long length)
length
- The proposed size of the bytes to readUnsupportedOperationException
- if reading the datum would allocate a
collection that the Java VM would be
unable to handleSystemLimitException
- if the decoding should fail because it
would otherwise result in an allocation
exceeding the set limitAvroRuntimeException
- if the length is negativepublic static int checkMaxCollectionLength(long existing, long items)
existing
- The number of elements items read in the collectionitems
- 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.UnsupportedOperationException
- if reading the items would allocate a
collection that the Java VM would be
unable to handleSystemLimitException
- if the decoding should fail because it
would otherwise result in an allocation
exceeding the set limitAvroRuntimeException
- if the length is negativepublic static int checkMaxStringLength(long length)
length
- The proposed size of the string to readUnsupportedOperationException
- if reading the items would allocate a
collection that the Java VM would be
unable to handleSystemLimitException
- if the decoding should fail because it
would otherwise result in an allocation
exceeding the set limitAvroRuntimeException
- if the length is negativeCopyright © 2009–2023 The Apache Software Foundation. All rights reserved.