Package com.rabbitmq.client.impl
Class ConsumerWorkService
java.lang.Object
com.rabbitmq.client.impl.ConsumerWorkService
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final ExecutorService
private static final org.slf4j.Logger
private static final int
private final boolean
private final int
-
Constructor Summary
ConstructorsConstructorDescriptionConsumerWorkService
(ExecutorService executor, ThreadFactory threadFactory, int shutdownTimeout) ConsumerWorkService
(ExecutorService executor, ThreadFactory threadFactory, int queueingTimeout, int shutdownTimeout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
void
registerKey
(Channel channel) void
setUnlimited
(Channel channel, boolean unlimited) void
shutdown()
Stop executing all consumer workvoid
Stop executing all consumer work for a particular channelboolean
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAX_RUNNABLE_BLOCK_SIZE
private static final int MAX_RUNNABLE_BLOCK_SIZE- See Also:
-
DEFAULT_NUM_THREADS
private static final int DEFAULT_NUM_THREADS -
executor
-
privateExecutor
private final boolean privateExecutor -
workPool
-
shutdownTimeout
private final int shutdownTimeout
-
-
Constructor Details
-
ConsumerWorkService
public ConsumerWorkService(ExecutorService executor, ThreadFactory threadFactory, int queueingTimeout, int shutdownTimeout) -
ConsumerWorkService
public ConsumerWorkService(ExecutorService executor, ThreadFactory threadFactory, int shutdownTimeout)
-
-
Method Details
-
getShutdownTimeout
public int getShutdownTimeout() -
shutdown
public void shutdown()Stop executing all consumer work -
stopWork
Stop executing all consumer work for a particular channel- Parameters:
channel
- to stop consumer work for
-
registerKey
-
setUnlimited
-
addWork
-
usesPrivateExecutor
public boolean usesPrivateExecutor()- Returns:
- true if executor used by this work service is managed by it and wasn't provided by the user
-