public BackupManager(HornetQServer server, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutor, NodeManager nodeManager, Configuration configuration, ClusterManager clusterManager) { this.server = server; this.executor = executorFactory.getExecutor(); this.scheduledExecutor = scheduledExecutor; this.nodeManager = nodeManager; this.configuration = configuration; this.clusterManager = clusterManager; }
public RemoteGroupingHandler(final ExecutorFactory executorFactory, final ManagementService managementService, final SimpleString name, final SimpleString address, final long timeout, final long groupTimeout) { super(executorFactory != null ? executorFactory.getExecutor() : null, managementService, address); this.name = name; this.timeout = timeout; this.groupTimeout = groupTimeout; }
public synchronized PagingStore newStore(final SimpleString address, final AddressSettings settings) { return new PagingStoreImpl(address, scheduledExecutor, syncTimeout, pagingManager, storageManager, null, this, address, settings, executorFactory.getExecutor(), syncNonTransactional); }
public ClusterManager(final ExecutorFactory executorFactory, final HornetQServer server, final PostOffice postOffice, final ScheduledExecutorService scheduledExecutor, final ManagementService managementService, final Configuration configuration, final NodeManager nodeManager, final boolean backup) { this.executorFactory = executorFactory; executor = executorFactory.getExecutor(); this.server = server; this.postOffice = postOffice; this.scheduledExecutor = scheduledExecutor; this.managementService = managementService; this.configuration = configuration; this.nodeManager = nodeManager; }
public LocalGroupingHandler(final ExecutorFactory executorFactory, final ScheduledExecutorService scheduledExecutor, final ManagementService managementService, final SimpleString name, final SimpleString address, final StorageManager storageManager, final long timeout, final long groupTimeout, long reaperPeriod) { super(executorFactory.getExecutor(), managementService, address); this.reaperPeriod = reaperPeriod; this.scheduledExecutor = scheduledExecutor; this.name = name; this.storageManager = storageManager; this.timeout = timeout; this.groupTimeout = groupTimeout; }
public ClusterManagerImpl(final ExecutorFactory executorFactory, final HornetQServer server, final PostOffice postOffice, final ScheduledExecutorService scheduledExecutor, final ManagementService managementService, final Configuration configuration, final UUID nodeUUID, final boolean backup, final boolean clustered) { if (nodeUUID == null) { throw new IllegalArgumentException("Node uuid is null"); } this.executorFactory = executorFactory; executor = executorFactory.getExecutor();; this.server = server; this.postOffice = postOffice; this.scheduledExecutor = scheduledExecutor; this.managementService = managementService; this.configuration = configuration; this.nodeUUID = nodeUUID; this.backup = backup; this.clustered = clustered; }
public static OperationContext getContext(final ExecutorFactory executorFactory) { OperationContext token = OperationContextImpl.threadLocalContext.get(); if (token == null) { if (executorFactory == null) { return null; } else { token = new OperationContextImpl(executorFactory.getExecutor()); OperationContextImpl.threadLocalContext.set(token); } } return token; }
public static OperationContext getContext(final ExecutorFactory executorFactory) { OperationContext token = OperationContextImpl.threadLocalContext.get(); if (token == null) { if (executorFactory == null) { return null; } else { token = new OperationContextImpl(executorFactory.getExecutor()); OperationContextImpl.threadLocalContext.set(token); } } return token; }
public StompProtocolManager(final HornetQServer server, final List<Interceptor> interceptors) { this.server = server; this.managementAddress = server.getConfiguration().getManagementAddress(); this.executor = server.getExecutorFactory().getExecutor(); }
address, settings, executorFactory.getExecutor(), syncNonTransactional);
public ConnectionEntry createConnectionEntry(final Acceptor acceptorUsed, final Connection connection) { StompConnection conn = new StompConnection(acceptorUsed, connection, this, server.getExecutorFactory().getExecutor()); // Note that STOMP has no heartbeat, so if connection ttl is non zero, data must continue to be sent or connection // will be timed out and closed! String ttlStr = (String)acceptorUsed.getConfiguration().get("connection-ttl"); Long ttl = ttlStr == null ? null : Long.valueOf(ttlStr); if (ttl != null) { if (ttl > 0) { return new ConnectionEntry(conn, null, System.currentTimeMillis(), ttl); } throw new IllegalStateException("Stomp Connection TTL cannot be negative : " + ttl); } ttl = server.getConfiguration().getConnectionTTLOverride(); if (ttl != -1) { return new ConnectionEntry(conn, null, System.currentTimeMillis(), ttl); } else { // Default to 1 minute - which is same as core protocol return new ConnectionEntry(conn, null, System.currentTimeMillis(), 1 * 60 * 1000); } }
public ServerSession createSession(final String name, final String username, final String password, final int minLargeMessageSize, final RemotingConnection connection, final boolean autoCommitSends, final boolean autoCommitAcks, final boolean preAcknowledge, final boolean xa, final String defaultAddress, final SessionCallback callback) throws Exception { if (securityStore != null) { securityStore.authenticate(username, password); } final OperationContext context = storageManager.newContext(getExecutorFactory().getExecutor()); final ServerSessionImpl session = internalCreateSession(name, username, password, minLargeMessageSize, connection, autoCommitSends, autoCommitAcks, preAcknowledge, xa, defaultAddress, callback, context); sessions.put(name, session); return session; }
storageManager, addressSettingsRepository, executorFactory.getExecutor()); storageManager, addressSettingsRepository, executorFactory.getExecutor());
closeExecutor = orderedExecutorFactory.getExecutor();
this.executor = executorFactory.getExecutor(); this.executor = executorFactory.getExecutor();
storageManager, addressSettingsRepository, executorFactory.getExecutor());
public Connection createConnection() { if (InVMConnector.failOnCreateConnection) { InVMConnector.incFailures(); log.debug("Returning null on InVMConnector for tests"); // For testing only return null; } Connection conn = internalCreateConnection(acceptor.getHandler(), new Listener(), acceptor.getExecutorFactory() .getExecutor()); acceptor.connect((String)conn.getID(), handler, this, executorFactory.getExecutor()); return conn; }
public Connection createConnection() { if (InVMConnector.failOnCreateConnection) { InVMConnector.incFailures(); HornetQServerLogger.LOGGER.debug("Returning null on InVMConnector for tests"); // For testing only return null; } Connection conn = internalCreateConnection(acceptor.getHandler(), new Listener(), acceptor.getExecutorFactory() .getExecutor()); acceptor.connect((String)conn.getID(), handler, this, executorFactory.getExecutor()); return conn; }
closeExecutor = orderedExecutorFactory.getExecutor();
private StompSession getSession(StompConnection connection) throws Exception { StompSession stompSession = sessions.get(connection.getID()); if (stompSession == null) { stompSession = new StompSession(connection, this, server.getStorageManager() .newContext(server.getExecutorFactory().getExecutor())); String name = UUIDGenerator.getInstance().generateStringUUID(); ServerSession session = server.createSession(name, connection.getLogin(), connection.getPasscode(), HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, connection, true, false, false, false, null, stompSession); stompSession.setServerSession(session); sessions.put(connection.getID(), stompSession); } server.getStorageManager().setContext(stompSession.getContext()); return stompSession; }