docs
This commit is contained in:
parent
1b7ffd040b
commit
f54da4c3d3
|
@ -436,7 +436,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method blocks until a confirmation is received
|
* This method blocks until a confirmation is received or {@link Timeouts#BINARY_IO_TIMEOUT} is reached
|
||||||
*
|
*
|
||||||
* @return true in case of timeout, false if got proper confirmation
|
* @return true in case of timeout, false if got proper confirmation
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -41,12 +41,12 @@ public class IncomingDataBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blocking method which would for specified amout of data
|
* Blocking method which would wait for specified amount of data
|
||||||
*
|
*
|
||||||
* @return true in case of timeout, false if everything is fine
|
* @return true in case of timeout, false if everything is fine
|
||||||
*/
|
*/
|
||||||
public boolean waitForBytes(String msg, long startTimestamp, int count) throws InterruptedException {
|
public boolean waitForBytes(String loggingMessage, long startTimestamp, int count) throws InterruptedException {
|
||||||
logger.info("Waiting for " + count + " byte(s): " + msg);
|
logger.info(loggingMessage + ": waiting for " + count + " byte(s)");
|
||||||
synchronized (cbb) {
|
synchronized (cbb) {
|
||||||
while (cbb.length() < count) {
|
while (cbb.length() < count) {
|
||||||
int timeout = (int) (startTimestamp + Timeouts.BINARY_IO_TIMEOUT - System.currentTimeMillis());
|
int timeout = (int) (startTimestamp + Timeouts.BINARY_IO_TIMEOUT - System.currentTimeMillis());
|
||||||
|
|
|
@ -5,6 +5,8 @@ import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* This class is used to figure out if we have multiple instances of rusEfi console running
|
||||||
|
*
|
||||||
* (c) Andrey Belomutskiy
|
* (c) Andrey Belomutskiy
|
||||||
* 5/4/2015
|
* 5/4/2015
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue