Package io.mats3.matssocket.impl
Class SaneThreadPoolExecutor
java.lang.Object
io.mats3.matssocket.impl.SaneThreadPoolExecutor
- All Implemented Interfaces:
MatsSocketStatics
,Executor
Trick to make ThreadPoolExecutor work as anyone in the world would expect: Have a constant pool of "corePoolSize",
and then as more tasks are concurrently running than threads available, you increase the number of threads until
"maxPoolSize", at which point the rest go on queue.
Snitched from https://stackoverflow.com/a/24493856.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.mats3.matssocket.impl.MatsSocketStatics
MatsSocketStatics.DebugStackTrace, MatsSocketStatics.DirectJson, MatsSocketStatics.DirectJsonMessageHandlingDeserializer, MatsSocketStatics.MatsSocketEnvelopeDto_Mixin, MatsSocketStatics.MessageToStringDeserializer, MatsSocketStatics.SocketSendIOException
-
Field Summary
Fields inherited from interface io.mats3.matssocket.impl.MatsSocketStatics
MAX_FORWARDER_POOL_SIZE, MAX_LENGTH_OF_TOPIC_NAME, MAX_NUMBER_OF_COMPENSATING_TRANSACTIONS_ATTEMPTS, MAX_NUMBER_OF_HELD_ENVELOPES_PER_SESSION, MAX_NUMBER_OF_MESSAGES_PER_FORWARD_LOOP, MAX_NUMBER_OF_OUTBOX_STORE_ATTEMPTS_CSAF, MAX_NUMBER_OF_RECORDED_ENVELOPES_PER_SESSION, MAX_NUMBER_OF_REDELIVERY_ATTEMPTS, MAX_NUMBER_OF_SESSIONS_PER_USER_ID, MAX_NUMBER_OF_TOPICS_PER_SESSION, MAX_SIZE_OF_HELD_ENVELOPE_MSGS, MDC_CLIENT_APP_NAME_AND_VERSION, MDC_CLIENT_LIB_AND_VERSIONS, MDC_CMID, MDC_MESSAGE_TYPE, MDC_PRINCIPAL_NAME, MDC_SESSION_ID, MDC_SMID, MDC_TRACE_ID, MDC_USER_ID, MILLIS_BETWEEN_COMPENSATING_TRANSACTIONS_ATTEMPTS, MILLIS_BETWEEN_LIVELINESS_UPDATE_RUN, MILLIS_BETWEEN_SCAVENGE_SESSION_REMNANTS_RUN, MILLIS_BETWEEN_SESSION_TIMEOUT_RUN, MILLIS_SESSION_TIMEOUT_SUPPLIER, MIN_FORWARDER_POOL_SIZE, NUMBER_OF_OUTGOING_ENVELOPES_SCHEDULER_THREADS, THREAD_PREFIX
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.mats3.matssocket.impl.MatsSocketStatics
jacksonMapper, ms, msSince