Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
Resolve review comments regarding formating
  • Loading branch information
RagnarW authored and martinfurmanski committed Sep 10, 2018
1 parent db26ea7 commit 2832668
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
Expand Up @@ -31,7 +31,6 @@

import org.neo4j.causalclustering.messaging.marshalling.CoreReplicatedContentMarshal;
import org.neo4j.causalclustering.messaging.marshalling.v2.encoding.ContentTypeEncoder;
import org.neo4j.causalclustering.messaging.marshalling.v2.encoding.RaftLogEntryTermsSerialize;
import org.neo4j.causalclustering.messaging.marshalling.v2.encoding.RaftMessageContentEncoder;
import org.neo4j.causalclustering.messaging.marshalling.v2.encoding.RaftMessageEncoder;
import org.neo4j.causalclustering.protocol.ModifierProtocolInstaller;
Expand Down
Expand Up @@ -28,6 +28,7 @@

import org.neo4j.causalclustering.core.replication.ReplicatedContent;
import org.neo4j.causalclustering.messaging.MessageTooBigException;
import org.neo4j.util.Preconditions;

import static java.lang.String.format;
import static org.neo4j.io.ByteUnit.gibiBytes;
Expand Down Expand Up @@ -67,10 +68,7 @@ class MaxTotalSize implements ByteBufChunkHandler

MaxTotalSize( long maxSize )
{
if ( maxSize < 0 )
{
throw new IllegalArgumentException( "Max size cannot be less than 0. Got " + maxSize );
}
Preconditions.requirePositive( maxSize );
this.maxSize = maxSize;
}

Expand Down
Expand Up @@ -55,7 +55,7 @@ public void marshal( WritableChannel channel ) throws IOException
ByteBufInputStream byteBufInputStream = new ByteBufInputStream( content() );
byte[] bytes = new byte[CHUNK_SIZE];
int read;
while ( (read = byteBufInputStream.read( bytes )) != -1 )
while ( ( read = byteBufInputStream.read( bytes ) ) != -1 )
{
channel.put( bytes, read );
}
Expand Down
Expand Up @@ -54,8 +54,8 @@ public void channelRead( ChannelHandlerContext ctx, Object msg )
}
}

ctx.fireChannelRead( msg );
}
ctx.fireChannelRead( msg );
}

private ContentType getContentType( byte messageCode )
{
Expand Down
Expand Up @@ -30,7 +30,7 @@
import org.neo4j.causalclustering.core.consensus.log.RaftLogEntry;
import org.neo4j.causalclustering.messaging.marshalling.v2.ContentType;

public class RaftLogEntryTermsSerialize
class RaftLogEntryTermsSerializer
{
static ByteBuf serializeTerms( RaftLogEntry[] raftLogEntries, ByteBufAllocator byteBufAllocator )
{
Expand Down
Expand Up @@ -34,7 +34,7 @@
import org.neo4j.causalclustering.messaging.marshalling.CoreReplicatedContentMarshal;
import org.neo4j.causalclustering.messaging.marshalling.v2.ContentType;

import static org.neo4j.causalclustering.messaging.marshalling.v2.encoding.RaftLogEntryTermsSerialize.serializeTerms;
import static org.neo4j.causalclustering.messaging.marshalling.v2.encoding.RaftLogEntryTermsSerializer.serializeTerms;

/**
* Serializes a raft messages content in the order Message, RaftLogTerms, ReplicatedContent.
Expand Down

0 comments on commit 2832668

Please sign in to comment.