NatsConnectionWriter(NatsConnection connection) { this.connection = connection; this.running = new AtomicBoolean(false); this.reconnectMode = new AtomicBoolean(false); this.stopped = new CompletableFuture<>(); this.stopped.complete(Boolean.TRUE); // we are stopped on creation this.sendBuffer = new byte[connection.getOptions().getBufferSize()]; outgoing = new MessageQueue(true); reconnectOutgoing = new MessageQueue(true); }
NatsConnectionWriter(NatsConnection connection) { this.connection = connection; this.running = new AtomicBoolean(false); this.reconnectMode = new AtomicBoolean(false); this.stopped = new CompletableFuture<>(); this.stopped.complete(Boolean.TRUE); // we are stopped on creation this.sendBuffer = new byte[connection.getOptions().getBufferSize()]; outgoing = new MessageQueue(true); reconnectOutgoing = new MessageQueue(true); }
void readInitialInfo() throws IOException { byte[] readBuffer = new byte[options.getBufferSize()]; ByteBuffer protocolBuffer = ByteBuffer.allocate(options.getBufferSize()); boolean gotCRLF = false; boolean gotCR = false;
void readInitialInfo() throws IOException { byte[] readBuffer = new byte[options.getBufferSize()]; ByteBuffer protocolBuffer = ByteBuffer.allocate(options.getBufferSize()); boolean gotCRLF = false; boolean gotCR = false;
NatsConnectionReader(NatsConnection connection) { this.connection = connection; this.running = new AtomicBoolean(false); this.stopped = new CompletableFuture<>(); this.stopped.complete(Boolean.TRUE); // we are stopped on creation this.protocolBuffer = ByteBuffer.allocate(this.connection.getOptions().getMaxControlLine()); this.msgLineChars = new char[this.connection.getOptions().getMaxControlLine()]; this.opArray = new char[MAX_PROTOCOL_OP_LENGTH]; this.buffer = new byte[connection.getOptions().getBufferSize()]; this.bufferPosition = 0; this.utf8Mode = connection.getOptions().supportUTF8Subjects(); }
NatsConnectionReader(NatsConnection connection) { this.connection = connection; this.running = new AtomicBoolean(false); this.stopped = new CompletableFuture<>(); this.stopped.complete(Boolean.TRUE); // we are stopped on creation this.protocolBuffer = ByteBuffer.allocate(this.connection.getOptions().getMaxControlLine()); this.msgLineChars = new char[this.connection.getOptions().getMaxControlLine()]; this.opArray = new char[MAX_PROTOCOL_OP_LENGTH]; this.buffer = new byte[connection.getOptions().getBufferSize()]; this.bufferPosition = 0; this.utf8Mode = connection.getOptions().supportUTF8Subjects(); }