Search in sources :

Example 6 with TransactionBatch

use of org.wildfly.clustering.ee.cache.tx.TransactionBatch in project wildfly by wildfly.

the class HotRodSessionManagerFactory method createSessionManager.

@Override
public SessionManager<LC, TransactionBatch> createSessionManager(SessionManagerConfiguration<SC> configuration) {
    Registrar<SessionExpirationListener> expirationRegistrar = this.expirationRegistrar;
    Batcher<TransactionBatch> batcher = this.batcher;
    Duration transactionTimeout = this.transactionTimeout;
    HotRodSessionManagerConfiguration<SC> config = new HotRodSessionManagerConfiguration<SC>() {

        @Override
        public SessionExpirationListener getExpirationListener() {
            return configuration.getExpirationListener();
        }

        @Override
        public Registrar<SessionExpirationListener> getExpirationRegistrar() {
            return expirationRegistrar;
        }

        @Override
        public Supplier<String> getIdentifierFactory() {
            return configuration.getIdentifierFactory();
        }

        @Override
        public SC getServletContext() {
            return configuration.getServletContext();
        }

        @Override
        public Batcher<TransactionBatch> getBatcher() {
            return batcher;
        }

        @Override
        public Duration getStopTimeout() {
            return transactionTimeout;
        }
    };
    return new ConcurrentSessionManager<>(new HotRodSessionManager<>(this.factory, config), ConcurrentManager::new);
}
Also used : SessionExpirationListener(org.wildfly.clustering.web.session.SessionExpirationListener) TransactionBatch(org.wildfly.clustering.ee.cache.tx.TransactionBatch) ConcurrentManager(org.wildfly.clustering.ee.cache.ConcurrentManager) Duration(java.time.Duration) ConcurrentSessionManager(org.wildfly.clustering.web.cache.session.ConcurrentSessionManager)

Aggregations

TransactionBatch (org.wildfly.clustering.ee.cache.tx.TransactionBatch)6 Test (org.junit.Test)5 Duration (java.time.Duration)4 Group (org.wildfly.clustering.group.Group)4 Instant (java.time.Instant)1 ConcurrentManager (org.wildfly.clustering.ee.cache.ConcurrentManager)1 ConcurrentSessionManager (org.wildfly.clustering.web.cache.session.ConcurrentSessionManager)1 ImmutableSessionMetaData (org.wildfly.clustering.web.session.ImmutableSessionMetaData)1 SessionExpirationListener (org.wildfly.clustering.web.session.SessionExpirationListener)1 SessionExpirationMetaData (org.wildfly.clustering.web.session.SessionExpirationMetaData)1