Reduce line padding.

This commit is contained in:
Peter Lawrey
2015-09-11 15:26:02 +01:00
parent 2839bde340
commit 8a816054d3
53 changed files with 384 additions and 740 deletions
@@ -394,7 +394,6 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
// null check (Attached)key.attachment();
// connectionListener.onDiconnect( ((SocketChannel)key.channel()).socket().getInetAddress(), ((Attached)key.attachment()).remoteIdentifier);
closeEarlyAndQuietly(key.channel());
}
@@ -533,7 +532,6 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
final String localVersion = BuildVersion.version();
final String remoteVersion = attached.serverVersion;
if (!remoteVersion.equals(localVersion)) {
byte remoteIdentifier = attached.remoteIdentifier;
LOG.warn("DIFFERENT CHRONICLE-MAP VERSIONS : " +
@@ -582,7 +580,6 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
attached.remoteIdentifier = remoteIdentifier;
// todo OZAN : add call to onConnectedListener.
//connectionListener. onConnected(channel.socket().getInetAddress() , attached
// .remoteIdentifier, attached.isServer );
@@ -1058,7 +1055,6 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
*/
class TcpSocketChannelEntryWriter {
@NotNull
private final EntryCallback entryCallback;
// if uncompletedWork is set ( not null ) , this must be completed before any further work
@@ -1227,7 +1223,6 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
return len;
}
/**
* used to send an single zero byte if we have not send any data for up to the
* localHeartbeatInterval
@@ -1244,7 +1239,6 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
in().writeLong(localHeartbeatInterval);
}
public boolean doWork() {
return uncompletedWork != null && uncompletedWork.doWork(in());
}
@@ -1467,7 +1461,6 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
return null;
}
public long readRemoteHeartbeatIntervalFromBuffer() {
return (out.remaining() >= 8) ? out.readLong() : Long.MIN_VALUE;
}
@@ -1504,7 +1497,6 @@ class StatelessServerConnector<K, V> {
private final SerializationBuilder<V> valueSerializationBuilder;
private final int tcpBufferSize;
StatelessServerConnector(
@NotNull VanillaChronicleMap<K, ?, ?, V, ?, ?> map,
@NotNull final BufferResizer bufferResizer, int tcpBufferSize,
@@ -1535,7 +1527,6 @@ class StatelessServerConnector<K, V> {
int headerSize = reader.readInt();
reader.skip(headerSize);
// these methods don't return a result to the client or don't return a result to the
// client immediately
switch (event) {
@@ -1560,7 +1551,6 @@ class StatelessServerConnector<K, V> {
final long sizeLocation = reflectTransactionId(writer.in(), transactionId);
// these methods return a result
switch (event) {
@@ -1664,7 +1654,6 @@ class StatelessServerConnector<K, V> {
return null;
}
@Nullable
public Work mapForKey(@NotNull ByteBufferBytes reader, @NotNull TcpReplicator.TcpSocketChannelEntryWriter writer,
long sizeLocation) {
@@ -1769,11 +1758,9 @@ class StatelessServerConnector<K, V> {
return null;
}
@Nullable
private Work applicationVersion(@NotNull TcpReplicator.TcpSocketChannelEntryWriter writer, final long sizeLocation) {
final long remaining = writer.in().remaining();
try {
String result = map.applicationVersion();
@@ -1788,11 +1775,9 @@ class StatelessServerConnector<K, V> {
return null;
}
@Nullable
private Work persistedDataVersion(@NotNull TcpReplicator.TcpSocketChannelEntryWriter writer, final long sizeLocation) {
final long remaining = writer.in().remaining();
try {
String result = map.persistedDataVersion();
@@ -2132,7 +2117,6 @@ class StatelessServerConnector<K, V> {
out.position(pos);
}
}
private void writeException(@NotNull TcpReplicator.TcpSocketChannelEntryWriter out, Throwable e) {