Package org.jboss.as.clustering.lock

Examples of org.jboss.as.clustering.lock.SharedLocalYieldingClusterLockManager


            Transport transport = container.getCache().getCacheManager().getTransport();
            if (transport != null) {
                Channel channel = ((org.infinispan.remoting.transport.jgroups.JGroupsTransport) transport).getChannel();
                this.service = new CoreGroupCommunicationService(Integer.valueOf(0).shortValue());
                service.setChannel(channel);
                this.lockManager = new SharedLocalYieldingClusterLockManager("lock", service, service);
            } else {
                this.service = null;
                this.lockManager = null;
            }
        }
View Full Code Here


    }

    @Override
    public void start(StartContext context) throws StartException {
        CoreGroupCommunicationService service = this.service.getValue();
        this.lockManager = new SharedLocalYieldingClusterLockManager(this.name, service, service);
        try {
            this.lockManager.start();
        } catch (Exception e) {
            throw new StartException(e);
        }
View Full Code Here

    private SessionAttributeMarshallerFactory marshallerFactory = new SessionAttributeMarshallerFactoryImpl();

    @Override
    public <T extends OutgoingDistributableSessionData> org.jboss.as.clustering.web.DistributedCacheManager<T> getDistributedCacheManager(ServiceRegistry registry, LocalDistributableSessionManager manager) {
        Cache<SessionKeyImpl, Map<Object, Object>> sessionCache = this.sessionCacheSource.getCache(registry, manager);
        SharedLocalYieldingClusterLockManager lockManager = this.lockManagerSource.getLockManager(sessionCache);
        BatchingManager batchingManager = new TransactionBatchingManager(sessionCache.getAdvancedCache().getTransactionManager());
        SessionAttributeStorage<T> storage = this.storageFactory.createStorage(manager.getReplicationConfig().getReplicationGranularity(), this.marshallerFactory.createMarshaller(manager));

        return new DistributedCacheManager<T, SessionKeyImpl>(registry, manager, new AtomicMapCache<SessionKeyImpl, Object, Object>(sessionCache), this.jvmRouteCacheSource, lockManager, storage, batchingManager, new SessionKeyFactoryImpl(manager), this.invoker);
    }
View Full Code Here

    }

    @Override
    protected void start() throws Exception {
        CoreGroupCommunicationService service = this.service.getValue();
        this.lockManager = new SharedLocalYieldingClusterLockManager(this.name, service, service);
        this.lockManager.start();
    }
View Full Code Here

                this.service.start();
            } catch (Exception e) {
                throw new IllegalStateException(String.format("Unexpected exception while starting group communication service for %s", channel.getClusterName()));
            }

            this.lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, this.service, this.service);

            try {
                this.lockManager.start();
            } catch (Exception e) {
                this.service.stop();
View Full Code Here

    public <T extends OutgoingDistributableSessionData> org.jboss.as.clustering.web.DistributedCacheManager<T> getDistributedCacheManager(ServiceRegistry registry, LocalDistributableSessionManager manager) throws ClusteringNotSupportedException {
        AdvancedCache<SessionKeyImpl, Map<Object, Object>> sessionCache = this.sessionCacheSource.<SessionKeyImpl, Map<Object, Object>>getCache(registry, manager).getAdvancedCache().with(this.getClass().getClassLoader());
        if (!sessionCache.getConfiguration().isInvocationBatchingEnabled()) {
            throw new ClusteringNotSupportedException(String.format("Failed to configure web application for <distributable/> sessions.  %s.%s cache requires batching=\"true\".", sessionCache.getCacheManager().getGlobalConfiguration().getCacheManagerName(), sessionCache.getName()));
        }
        SharedLocalYieldingClusterLockManager lockManager = this.lockManagerSource.getLockManager(sessionCache);
        BatchingManager batchingManager = new TransactionBatchingManager(sessionCache.getTransactionManager());
        SessionAttributeStorage<T> storage = this.storageFactory.createStorage(manager.getReplicationConfig().getReplicationGranularity(), this.marshallerFactory.createMarshaller(manager));

        return new DistributedCacheManager<T, SessionKeyImpl>(registry, manager, new AtomicMapCache<SessionKeyImpl, Object, Object>(sessionCache), this.jvmRouteCacheSource, lockManager, storage, batchingManager, new SessionKeyFactoryImpl(manager), this.invoker);
    }
View Full Code Here

    }

    @Override
    protected void start() throws Exception {
        CoreGroupCommunicationService service = this.service.getValue();
        this.lockManager = new SharedLocalYieldingClusterLockManager(this.name, service, service);
        this.lockManager.start();
    }
View Full Code Here

                this.service.start();
            } catch (Exception e) {
                throw MESSAGES.errorStartingGroupCommunications(e, channel.getClusterName());
            }

            this.lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, this.service, this.service);

            try {
                this.lockManager.start();
            } catch (Exception e) {
                this.service.stop();
View Full Code Here

    public <T extends OutgoingDistributableSessionData> org.jboss.as.clustering.web.DistributedCacheManager<T> getDistributedCacheManager(ServiceRegistry registry, LocalDistributableSessionManager manager) throws ClusteringNotSupportedException {
        AdvancedCache<SessionKeyImpl, Map<Object, Object>> sessionCache = this.sessionCacheSource.<SessionKeyImpl, Map<Object, Object>>getCache(registry, manager).getAdvancedCache().with(this.getClass().getClassLoader());
        if (!sessionCache.getConfiguration().isInvocationBatchingEnabled()) {
            throw new ClusteringNotSupportedException(MESSAGES.failedToConfigureWebApp(sessionCache.getCacheManager().getGlobalConfiguration().getCacheManagerName(), sessionCache.getName()));
        }
        SharedLocalYieldingClusterLockManager lockManager = this.lockManagerSource.getLockManager(sessionCache);
        BatchingManager batchingManager = new TransactionBatchingManager(sessionCache.getTransactionManager());
        SessionAttributeStorage<T> storage = this.storageFactory.createStorage(manager.getReplicationConfig().getReplicationGranularity(), this.marshallerFactory.createMarshaller(manager));

        return new DistributedCacheManager<T, SessionKeyImpl>(registry, manager, new AtomicMapCache<SessionKeyImpl, Object, Object>(sessionCache), this.jvmRouteCacheSource, lockManager, storage, batchingManager, new SessionKeyFactoryImpl(manager), this.invoker);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.clustering.lock.SharedLocalYieldingClusterLockManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.