Ejemplo n.º 1
0
  public OClusterPosition readClusterPosition() throws IOException {
    final int serializedSize = OClusterPositionFactory.INSTANCE.getSerializedSize();

    if (debug)
      OLogManager.instance()
          .info(
              this,
              "%s - Reading cluster position (%d bytes)....",
              socket.getRemoteSocketAddress(),
              serializedSize);

    final OClusterPosition clusterPosition =
        OClusterPositionFactory.INSTANCE.fromStream((InputStream) in);

    updateMetricReceivedBytes(serializedSize);

    if (debug)
      OLogManager.instance()
          .info(
              this,
              "%s - Read cluster position: %s",
              socket.getRemoteSocketAddress(),
              clusterPosition);

    return clusterPosition;
  }