| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private static final String[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static long | Returns: Adjusted size (original size or 90% of max heap memory)Size to be adjusted. value)Method to adjust result memory limit size. |
| private static long | Returns: Size of byte buffer based on percent of max heap memory.String which contains percent + percent phrase which gonna be used
during calculations. value, int Length of percent phrase inside given value. percentPhraseLength)Method to calculate percent of given max heap memory. |
| private static boolean | Returns: Result if value contains percent.Value to check. value)Method to check if given value can contain percent declaration of size of max result buffer. |
| private static int | Returns: Length of phrase inside string, returns -1 when no phrase found.String which is gonna be checked if contains percent phrase. valueToCheck)Method to get length of percent phrase existing in given string, only if one of phrases exist on the length of string. |
| private static int | Returns: Length of phrase inside string, returns -1 when phrase wasn't found.String which gonna be checked if contains phrase. valueToCheck, String Phrase to be looked for on the end of given string. phrase)Method to get length of given phrase in given string to check, method checks if phrase exist on the end of given string. |
| private static long | Returns: percent value of max result buffer size.string containing percent used to define max result buffer. value)Method to get percent value of max result buffer size dependable on actual free memory. |
| private static long | Returns: Size based on given string.Given string to be parsed. value)Method to get size based on given string value. |
| public static long | Returns: value of max result buffer size.string containing size of bytes with optional multiplier (T, G, M or K) or percent
value to declare max percent of heap memory to use. value)Method to parse value of max result buffer size. |
| private static void | throwExceptionAboutParsingError(String
Message to be added to exception. message, Object... Values to be put inside exception message. values)Method to throw message for parsing MaxResultBuffer. |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| PERCENT_PHRASES | back to summary |
|---|---|
| private static final String[] PERCENT_PHRASES | |
| PGPropertyMaxResultBufferParser | back to summary |
|---|---|
| public PGPropertyMaxResultBufferParser() | |
| adjustResultSize | back to summary |
|---|---|
| private static long adjustResultSize(long value) Method to adjust result memory limit size. If given memory is larger than 90% of max heap memory then it gonna be reduced to 90% of max heap memory.
| |
| calculatePercentOfMemory | back to summary |
|---|---|
| private static long calculatePercentOfMemory(String value, int percentPhraseLength) Method to calculate percent of given max heap memory.
| |
| checkIfValueContainsPercent | back to summary |
|---|---|
| private static boolean checkIfValueContainsPercent(String value) Method to check if given value can contain percent declaration of size of max result buffer.
| |
| getPercentPhraseLengthIfContains | back to summary |
|---|---|
| private static int getPercentPhraseLengthIfContains(String valueToCheck) Method to get length of percent phrase existing in given string, only if one of phrases exist on the length of string.
| |
| getPhraseLengthIfContains | back to summary |
|---|---|
| private static int getPhraseLengthIfContains(String valueToCheck, String phrase) Method to get length of given phrase in given string to check, method checks if phrase exist on the end of given string. | |
| parseBytePercentValue | back to summary |
|---|---|
| private static long parseBytePercentValue(String value) throws PSQLException Method to get percent value of max result buffer size dependable on actual free memory. This method doesn't check other possibilities of value declaration.
| |
| parseByteValue | back to summary |
|---|---|
| private static long parseByteValue(String value) throws PSQLException Method to get size based on given string value. String can contains just a number or number + multiplier sign (like T, G, M or K).
| |
| parseProperty | back to summary |
|---|---|
| public static long parseProperty(@Nullable String value) throws PSQLException Method to parse value of max result buffer size.
| |
| throwExceptionAboutParsingError | back to summary |
|---|---|
| private static void throwExceptionAboutParsingError(String message, Object... values) throws PSQLException Method to throw message for parsing MaxResultBuffer.
| |