Class DistributedL2SessionManager

java.lang.Object
com.mulesoft.connectors.mcp.internal.server.session.DistributedL2SessionManager
All Implemented Interfaces:
SessionManager

public class DistributedL2SessionManager extends Object implements SessionManager
A SessionManager implementation intended for cases in which the session information needs to be replicated across several replicas that (might or might not) be using OSv2 and/or be part of a Hazelcast cluster.

For instance, consider the case of streamable Http transport in which the sessions outlast the lifespan of an http request but CloudHub doesn't support sticky sessions. Therefore, we need to make sure that whatever replica handles each request it gets access to the session even if it was established by another node.

For this we use a two-layer cache, in which L1 is backed by a Guava cache (with idle invalidation) and the L2 is an ObjectStore that might or might not be backed by Hazelcast or OSv2.

Since:
0.2.0
  • Constructor Details

    • DistributedL2SessionManager

      public DistributedL2SessionManager(String ownerConfigName, org.mule.runtime.api.store.ObjectStore<MuleServerSession> l2ObjectStore, org.mule.runtime.api.lock.LockFactory lockFactory, Long sessionTimeoutMillis)
  • Method Details