|
|
@ -40,7 +40,7 @@ public class LogClientService { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* request time out |
|
|
|
* request time out |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private final long logRequestTimeout = 10 * 1000; |
|
|
|
private static final long LOG_REQUEST_TIMEOUT = 10 * 1000L; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* construct client |
|
|
|
* construct client |
|
|
@ -75,7 +75,7 @@ public class LogClientService { |
|
|
|
final Address address = new Address(host, port); |
|
|
|
final Address address = new Address(host, port); |
|
|
|
try { |
|
|
|
try { |
|
|
|
Command command = request.convert2Command(); |
|
|
|
Command command = request.convert2Command(); |
|
|
|
Command response = this.client.sendSync(address, command, logRequestTimeout); |
|
|
|
Command response = this.client.sendSync(address, command, LOG_REQUEST_TIMEOUT); |
|
|
|
if(response != null){ |
|
|
|
if(response != null){ |
|
|
|
RollViewLogResponseCommand rollReviewLog = FastJsonSerializer.deserialize( |
|
|
|
RollViewLogResponseCommand rollReviewLog = FastJsonSerializer.deserialize( |
|
|
|
response.getBody(), RollViewLogResponseCommand.class); |
|
|
|
response.getBody(), RollViewLogResponseCommand.class); |
|
|
@ -103,7 +103,7 @@ public class LogClientService { |
|
|
|
final Address address = new Address(host, port); |
|
|
|
final Address address = new Address(host, port); |
|
|
|
try { |
|
|
|
try { |
|
|
|
Command command = request.convert2Command(); |
|
|
|
Command command = request.convert2Command(); |
|
|
|
Command response = this.client.sendSync(address, command, logRequestTimeout); |
|
|
|
Command response = this.client.sendSync(address, command, LOG_REQUEST_TIMEOUT); |
|
|
|
if(response != null){ |
|
|
|
if(response != null){ |
|
|
|
ViewLogResponseCommand viewLog = FastJsonSerializer.deserialize( |
|
|
|
ViewLogResponseCommand viewLog = FastJsonSerializer.deserialize( |
|
|
|
response.getBody(), ViewLogResponseCommand.class); |
|
|
|
response.getBody(), ViewLogResponseCommand.class); |
|
|
@ -131,7 +131,7 @@ public class LogClientService { |
|
|
|
final Address address = new Address(host, port); |
|
|
|
final Address address = new Address(host, port); |
|
|
|
try { |
|
|
|
try { |
|
|
|
Command command = request.convert2Command(); |
|
|
|
Command command = request.convert2Command(); |
|
|
|
Command response = this.client.sendSync(address, command, logRequestTimeout); |
|
|
|
Command response = this.client.sendSync(address, command, LOG_REQUEST_TIMEOUT); |
|
|
|
if(response != null){ |
|
|
|
if(response != null){ |
|
|
|
GetLogBytesResponseCommand getLog = FastJsonSerializer.deserialize( |
|
|
|
GetLogBytesResponseCommand getLog = FastJsonSerializer.deserialize( |
|
|
|
response.getBody(), GetLogBytesResponseCommand.class); |
|
|
|
response.getBody(), GetLogBytesResponseCommand.class); |
|
|
|