public ServerSession(ServerConnection connection, ServerSessionDelegate delegate, Binary name, long expiry) { this.connection = connection; this.delegate = delegate; this.name = name; this.closing = false; this._isNoReplay = false; initReceiver(); _transaction = new AsyncAutoCommitTransaction(this.getMessageStore(),this); _blockingTimeout = connection.getBroker().getContextValue(Long.class, Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT); }
public AMQPConnection_0_8Impl(Broker<?> broker, ServerNetworkConnection network, AmqpPort<?> port, Transport transport, Protocol protocol, long connectionId, AggregateTicker aggregateTicker) { super(broker, network, port, transport, protocol, connectionId, aggregateTicker); _maxNoOfChannels = port.getSessionCountLimit(); _decoder = new BrokerDecoder(this); _binaryDataLimit = getBroker().getContextKeys(false).contains(BROKER_DEBUG_BINARY_DATA_LENGTH) ? getBroker().getContextValue(Integer.class, BROKER_DEBUG_BINARY_DATA_LENGTH) : DEFAULT_DEBUG_BINARY_DATA_LENGTH; String sendQueueDeleteOkRegardlessRegexp = getBroker().getContextKeys(false).contains(Broker.SEND_QUEUE_DELETE_OK_REGARDLESS_CLIENT_VER_REGEXP) ? getBroker().getContextValue(String.class, Broker.SEND_QUEUE_DELETE_OK_REGARDLESS_CLIENT_VER_REGEXP): ""; _sendQueueDeleteOkRegardlessClientVerRegexp = Pattern.compile(sendQueueDeleteOkRegardlessRegexp); _sender = network.getSender(); _closeWhenNoRoute = port.getCloseWhenNoRoute(); }
long totalCacheSize = broker.getContextValue(Long.class, BDBVirtualHost.QPID_BROKER_BDB_TOTAL_CACHE_SIZE); Collection<VirtualHostNode<?>> nodes = broker.getVirtualHostNodes(); Collection<BDBEnvironmentContainer> bdbEnvironmentContainers = new HashSet<>();
public AMQChannel(AMQPConnection_0_8 connection, int channelId, final MessageStore messageStore) { super(connection, channelId); _creditManager = new Pre0_10CreditManager(0L, 0L, connection.getContextValue(Long.class, AMQPConnection_0_8.HIGH_PREFETCH_LIMIT), connection.getContextValue(Long.class, AMQPConnection_0_8.BATCH_LIMIT)); _unacknowledgedMessageMap = new UnacknowledgedMessageMapImpl(DEFAULT_PREFETCH, this); _connection = connection; _channelId = channelId; _messageStore = messageStore; _blockingTimeout = connection.getBroker().getContextValue(Long.class, Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT); // by default the session is non-transactional _transaction = new AsyncAutoCommitTransaction(_messageStore, this); MethodRegistry methodRegistry = _connection.getMethodRegistry(); AMQMethodBody responseBody = methodRegistry.createTxCommitOkBody(); _txCommitOkFrame = new CachedFrame(responseBody.generateFrame(_channelId)); _clientDeliveryMethod = connection.createDeliveryMethod(_channelId); AccessController.doPrivileged((new PrivilegedAction<Object>() { @Override public Object run() { message(ChannelMessages.CREATE()); return null; } }),_accessControllerContext); }