| | |
| | | @Override |
| | | public void publish(final ReplicationMsg msg) throws IOException |
| | | { |
| | | publish(msg, ProtocolVersion.getCurrentVersion()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void publish(final ReplicationMsg msg, |
| | | final short reqProtocolVersion) throws IOException |
| | | { |
| | | final byte[] buffer = msg.getBytes(reqProtocolVersion); |
| | | final byte[] buffer = msg.getBytes(protocolVersion); |
| | | final String str = String.format("%08x", buffer.length); |
| | | final byte[] sendLengthBuf = str.getBytes(); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public short getProtocolVersion() |
| | | { |
| | | return protocolVersion; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setSoTimeout(final int timeout) throws SocketException |
| | | { |
| | | plainSocket.setSoTimeout(timeout); |