Class McpInMemoryTaskManager

java.lang.Object
com.soklet.McpInMemoryTaskManager
All Implemented Interfaces:
McpTaskManager

@ThreadSafe public final class McpInMemoryTaskManager extends Object implements McpTaskManager
Thread-safe, task-count-bounded, process-local manager for development and tests.

State exists only in this manager instance and is lost when its JVM exits. The manager provides no cross-process coordination, durable persistence, work queue, worker, lease, fencing, retry, or crash-recovery facility. It is therefore not a production task backend. Applications remain responsible for executing work and explicitly advancing task state through this class.

Retention is bounded by task count. Task values remain subject to Soklet's ordinary MCP request, JSON, and response limits when they cross the protocol boundary; this development helper does not attempt to estimate their JVM object sizes.

Worker mutations establish status-specific payload shape, not delivery validity under the origin tool's output schema and input declarations. Soklet performs those checks when reading or projecting a task. A failed delivery does not change authoritative state or notify the worker.

The manager never creates a thread and requires no close operation. Expired tasks are removed opportunistically during later manager operations. It never evicts an unexpired task to make room for another task.

Author:
Mark Allen