class ReaderConfig extends Serializable
Configuration for com.github.plokhotnyuk.jsoniter_scala.core.JsonReader that contains flags for tuning of
parsing exceptions and preferred sizes for internal buffers that are created on the reader instantiation and reused
in runtime for parsing of messages.
All configuration params already initialized by recommended default values, but in some cases they should be altered
for performance reasons:
- turn off stack traces for parsing exceptions to greatly reduce impact on performance for cases when exceptions can be not exceptional (e.g. under DoS attacks over open to the world systems), see more details here: https://shipilev.net/blog/2014/exceptional-performance/
- turn off appending of hex dump to minimize length of exception message
- increase preferred size of an internal byte buffer for parsing from java.io.InputStream or java.nio.DirectByteBuffer to reduce allocation rate of grown and then reduced buffers during parsing of large (>16Kb) numbers (including stringified), raw values, or ADT instances with the discriminator field doesn't appear in the beginning of the JSON object
- increase preferred size of an internal char buffer to reduce allocation rate of grown and then reduced buffers when large (>4Kb) string instances need to be parsed including those one which use Base16 or Base64 encodings
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- ReaderConfig
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val appendHexDumpToParseException: Boolean
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val checkForEndOfInput: Boolean
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val hexDumpSize: Int
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val maxBufSize: Int
- val maxCharBufSize: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val preferredBufSize: Int
- val preferredCharBufSize: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val throwReaderExceptionWithStackTrace: Boolean
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def withAppendHexDumpToParseException(appendHexDumpToParseException: Boolean): ReaderConfig
- def withCheckForEndOfInput(checkForEndOfInput: Boolean): ReaderConfig
- def withHexDumpSize(hexDumpSize: Int): ReaderConfig
- def withMaxBufSize(maxBufSize: Int): ReaderConfig
- def withMaxCharBufSize(maxCharBufSize: Int): ReaderConfig
- def withPreferredBufSize(preferredBufSize: Int): ReaderConfig
- def withPreferredCharBufSize(preferredCharBufSize: Int): ReaderConfig
- def withThrowReaderExceptionWithStackTrace(throwReaderExceptionWithStackTrace: Boolean): ReaderConfig
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated