use of com.linkedin.databus.core.BufferInfoResponse in project databus by linkedin.
the class BufferInfoRequestProcessor method processInboundRequest.
private void processInboundRequest(DatabusRequest request, PhysicalPartition pPart) throws IOException, DatabusException {
DbusEventBuffer evb = _eventBufferMult.getOneBuffer(pPart);
if (null == evb) {
LOG.error("BufferInfoRequest : Buffer not available for physical partition :" + pPart);
throw new BufferNotFoundException("Buffer not available for partition :" + pPart);
}
BufferInfoResponse response = new BufferInfoResponse();
response.setMinScn(evb.getMinScn());
response.setMaxScn(evb.lastWrittenScn());
response.setTimestampFirstEvent(evb.getTimestampOfFirstEvent());
response.setTimestampLatestEvent(evb.getTimestampOfLatestDataEvent());
writeJsonObjectToResponse(response, request);
}
Aggregations