//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private ContentBuilder<org.neo4j.causalclustering.core.replication.ReplicatedContent> unmarshal(byte contentType, org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException, org.neo4j.causalclustering.messaging.EndOfStreamException private ContentBuilder <ReplicatedContent> Unmarshal(sbyte contentType, ReadableChannel channel) { switch (contentType) { case TX_CONTENT_TYPE: return(ContentBuilder.Finished(ReplicatedTransactionSerializer.unmarshal(channel))); case RAFT_MEMBER_SET_TYPE: return(ContentBuilder.Finished(MemberIdSetSerializer.unmarshal(channel))); case ID_RANGE_REQUEST_TYPE: return(ContentBuilder.Finished(ReplicatedIdAllocationRequestSerializer.unmarshal(channel))); case TOKEN_REQUEST_TYPE: return(ContentBuilder.Finished(ReplicatedTokenRequestSerializer.unmarshal(channel))); case NEW_LEADER_BARRIER_TYPE: return(ContentBuilder.Finished(new NewLeaderBarrier())); case LOCK_TOKEN_REQUEST: return(ContentBuilder.Finished(ReplicatedLockTokenSerializer.unmarshal(channel))); case DISTRIBUTED_OPERATION: { return(DistributedOperation.deserialize(channel)); } case DUMMY_REQUEST: return(ContentBuilder.Finished(DummyRequest.Marshal.INSTANCE.unmarshal(channel))); default: throw new System.InvalidOperationException("Not a recognized content type: " + contentType); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: protected org.neo4j.causalclustering.core.replication.ReplicatedContent unmarshal0(org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException, org.neo4j.causalclustering.messaging.EndOfStreamException protected internal override ReplicatedContent Unmarshal0(ReadableChannel channel) { sbyte type = channel.Get(); ContentBuilder <ReplicatedContent> contentBuilder = Serializer.unmarshal(type, channel); while (!contentBuilder.Complete) { type = channel.Get(); contentBuilder = contentBuilder.Combine(Serializer.unmarshal(type, channel)); } return(contentBuilder.Build()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private ContentBuilder<org.neo4j.causalclustering.core.replication.ReplicatedContent> unmarshal(byte contentType, io.netty.buffer.ByteBuf buffer) throws java.io.IOException, org.neo4j.causalclustering.messaging.EndOfStreamException private ContentBuilder <ReplicatedContent> Unmarshal(sbyte contentType, ByteBuf buffer) { switch (contentType) { case TX_CONTENT_TYPE: { return(ContentBuilder.Finished(ReplicatedTransactionSerializer.decode(buffer))); } case DUMMY_REQUEST: return(ContentBuilder.Finished(DummyRequest.decode(buffer))); default: return(Unmarshal(contentType, new NetworkReadableClosableChannelNetty4(buffer))); } }