Class GraphBinaryReadLimits
java.lang.Object
org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryReadLimits
The bounds a
GraphBinaryReader applies to the length and count prefixes it reads from the wire before
using them to size an allocation. The values are exposed as the maxGraphBinaryValueLength,
maxGraphBinaryInitialCapacity and maxGraphBinaryBulkedListLength settings of Gremlin Server and the Java driver. A limit may be raised up to
Integer.MAX_VALUE.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GraphBinaryReadLimitsThe limits applied when none are configured.static final intThe default forgetMaxBulkedListLength(), which is 16,777,216.static final intThe default forgetMaxInitialCapacity(), which is 16,384.static final intThe default forgetMaxValueLength(), which is 64MB. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintThe maximum number of entries that a single bulked list may expand to.intThe maximum capacity reserved up front for a collection or map read from the wire.intThe maximum length in bytes of a singleString,BigIntegeror binary value.inthashCode()static GraphBinaryReadLimitsof(int maxValueLength, int maxInitialCapacity, int maxBulkedListLength) Creates limits from the supplied values, each of which must be greater than zero.toString()
-
Field Details
-
DEFAULT_MAX_VALUE_LENGTH
public static final int DEFAULT_MAX_VALUE_LENGTHThe default forgetMaxValueLength(), which is 64MB.- See Also:
-
DEFAULT_MAX_INITIAL_CAPACITY
public static final int DEFAULT_MAX_INITIAL_CAPACITYThe default forgetMaxInitialCapacity(), which is 16,384.- See Also:
-
DEFAULT_MAX_BULKED_LIST_LENGTH
public static final int DEFAULT_MAX_BULKED_LIST_LENGTHThe default forgetMaxBulkedListLength(), which is 16,777,216.- See Also:
-
DEFAULT
The limits applied when none are configured.
-
-
Method Details
-
of
public static GraphBinaryReadLimits of(int maxValueLength, int maxInitialCapacity, int maxBulkedListLength) Creates limits from the supplied values, each of which must be greater than zero.- Throws:
IllegalArgumentException- if a value is not greater than zero
-
getMaxValueLength
public int getMaxValueLength()The maximum length in bytes of a singleString,BigIntegeror binary value. A value declaring a longer length is rejected. -
getMaxInitialCapacity
public int getMaxInitialCapacity()The maximum capacity reserved up front for a collection or map read from the wire. This does not limit the size of the collection, which grows as elements are read. It only bounds the memory reserved before they are. -
getMaxBulkedListLength
public int getMaxBulkedListLength()The maximum number of entries that a single bulked list may expand to. A bulked list sends each distinct item once with a repeat count and is expanded into a full list when read, so a small message can otherwise describe a very large list. A bulked list that would expand beyond this size is rejected. -
equals
-
hashCode
public int hashCode() -
toString
-