//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void marshal(org.neo4j.storageengine.api.WritableChannel writableChannel, ByteArrayReplicatedTransaction replicatedTransaction) throws java.io.IOException public static void Marshal(WritableChannel writableChannel, ByteArrayReplicatedTransaction replicatedTransaction) { int length = replicatedTransaction.TxBytes.Length; writableChannel.PutInt(length); writableChannel.Put(replicatedTransaction.TxBytes, length); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void marshal(org.neo4j.storageengine.api.WritableChannel writableChannel, TransactionRepresentationReplicatedTransaction replicatedTransaction) throws java.io.IOException public static void Marshal(WritableChannel writableChannel, TransactionRepresentationReplicatedTransaction replicatedTransaction) { if (writableChannel is ByteBufBacked) { /* * Marshals more efficiently if Channel is going over the network. In practice, this means maintaining support for * RaftV1 without loosing performance */ ByteBuf buffer = (( ByteBufBacked )writableChannel).byteBuf(); int metaDataIndex = buffer.writerIndex(); int txStartIndex = metaDataIndex + Integer.BYTES; // leave room for length to be set later. buffer.writerIndex(txStartIndex); WriteTx(writableChannel, replicatedTransaction.Tx()); int txLength = buffer.writerIndex() - txStartIndex; buffer.setInt(metaDataIndex, txLength); } else { /* * Unknown length. This should only be reached in tests. When a ReplicatedTransaction is marshaled to file it has already passed over the network * and is of a different type. More efficient marshalling is used in ByteArrayReplicatedTransaction. */ MemoryStream outputStream = new MemoryStream(1024); OutputStreamWritableChannel outputStreamWritableChannel = new OutputStreamWritableChannel(outputStream); WriteTx(outputStreamWritableChannel, replicatedTransaction.Tx()); int length = outputStream.size(); writableChannel.PutInt(length); writableChannel.Put(outputStream.toByteArray(), length); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(SegmentHeader header, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(SegmentHeader header, WritableChannel channel) { channel.PutLong(header._prevFileLastIndex); channel.PutLong(header._version); channel.PutLong(header._prevIndex); channel.PutLong(header._prevTerm); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static void writeTx(org.neo4j.storageengine.api.WritableChannel writableChannel, org.neo4j.kernel.impl.transaction.TransactionRepresentation tx) throws java.io.IOException private static void WriteTx(WritableChannel writableChannel, TransactionRepresentation tx) { ReplicatedTransactionFactory.TransactionRepresentationWriter txWriter = transactionalRepresentationWriter(tx); while (txWriter.CanWrite()) { txWriter.Write(writableChannel); } }
/// <summary> /// This this consumer ignores the content which is handles by its own serializer. /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshalMetaData(org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public virtual void MarshalMetaData(WritableChannel channel) { channel.PutLong(GlobalSession().sessionId().MostSignificantBits); channel.PutLong(GlobalSession().sessionId().LeastSignificantBits); (new MemberId.Marshal()).marshal(GlobalSession().owner(), channel); channel.PutLong(_operationId.localSessionId()); channel.PutLong(_operationId.sequenceNumber()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(IdAllocationState state, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(IdAllocationState state, WritableChannel channel) { channel.PutLong(( long )state._firstUnallocated.Length); foreach (long l in state._firstUnallocated) { channel.PutLong(l); } channel.PutLong(state._logIndex); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(org.neo4j.causalclustering.core.replication.ReplicatedContent content, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public override void marshal(ReplicatedContent content, WritableChannel channel) { if (content is ReplicatedInteger) { channel.Put(( sbyte )1); channel.PutInt((( ReplicatedInteger )content).get()); } else { throw new System.ArgumentException("Unknown content type " + content.GetType()); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(DummyRequest dummy, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(DummyRequest dummy, WritableChannel channel) { if (dummy._data != null) { channel.PutInt(dummy._data.Length); channel.Put(dummy._data, dummy._data.Length); } else { channel.PutInt(0); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void marshal(org.neo4j.storageengine.api.WritableChannel channel, String string) throws java.io.IOException public static void Marshal(WritableChannel channel, string @string) { if (string.ReferenceEquals(@string, null)) { channel.PutInt(NULL_STRING_LENGTH); } else { sbyte[] bytes = @string.GetBytes(UTF_8); channel.PutInt(bytes.Length); channel.Put(bytes, bytes.Length); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(org.neo4j.causalclustering.identity.StoreId storeId, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public override void Marshal(StoreId storeId, WritableChannel channel) { if (storeId == null) { channel.Put(( sbyte )0); return; } channel.Put(( sbyte )1); channel.PutLong(storeId.CreationTime); channel.PutLong(storeId.RandomId); channel.PutLong(storeId.UpgradeTime); channel.PutLong(storeId.UpgradeId); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(org.neo4j.causalclustering.core.replication.ReplicatedContent content, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public override void Marshal(ReplicatedContent content, WritableChannel channel) { if (content is ReplicatedInteger) { channel.Put(( sbyte )REPLICATED_INTEGER_TYPE); channel.PutInt((( ReplicatedInteger )content).get()); } else if (content is ReplicatedString) { string value = (( ReplicatedString )content).get(); sbyte[] stringBytes = value.GetBytes(); channel.Put(( sbyte )REPLICATED_STRING_TYPE); channel.PutInt(stringBytes.Length); channel.Put(stringBytes, stringBytes.Length); } else { throw new System.ArgumentException("Unknown content type: " + content); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void marshal(org.neo4j.storageengine.api.WritableChannel channel, boolean value) throws java.io.IOException public static void Marshal(WritableChannel channel, bool value) { channel.Put(( sbyte )(value ? 1 : 0)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(org.neo4j.storageengine.api.WritableChannel writableChannel) throws java.io.IOException public override void Marshal( WritableChannel writableChannel ) { ReplicatedTransactionSerializer.Marshal( writableChannel, this ); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(System.Nullable<long> index, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public override void Marshal(long?index, WritableChannel channel) { channel.PutLong(index.Value); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(System.Nullable<long> aLong, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public override void Marshal(long?aLong, WritableChannel channel) { channel.PutLong(aLong.Value); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void write(org.neo4j.storageengine.api.WritableChannel channel, org.neo4j.causalclustering.messaging.marshalling.ChannelMarshal<org.neo4j.causalclustering.core.replication.ReplicatedContent> contentMarshal, long logIndex, long term, org.neo4j.causalclustering.core.replication.ReplicatedContent content) throws java.io.IOException public static void Write(WritableChannel channel, ChannelMarshal <ReplicatedContent> contentMarshal, long logIndex, long term, ReplicatedContent content) { channel.PutLong(logIndex); channel.PutLong(term); contentMarshal.Marshal(content, channel); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(VoteState state, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(VoteState state, WritableChannel channel) { channel.PutLong(state._term); MemberMarshal.marshal(state.VotedFor(), channel); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(ReplicatedLockTokenState state, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(ReplicatedLockTokenState state, WritableChannel channel) { channel.PutLong(state._ordinal); channel.PutInt(state.Get().id()); MemberMarshal.marshal(state.Get().owner(), channel); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(DatabaseName databaseName, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(DatabaseName databaseName, WritableChannel channel) { StringMarshal.marshal(channel, databaseName.Name()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(FileChunk fileChunk, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(FileChunk fileChunk, WritableChannel channel) { channel.PutInt(fileChunk._encodedLength); sbyte[] bytes = fileChunk.Bytes(); channel.Put(bytes, bytes.Length); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void marshal(ReplicatedLockTokenRequest tokenRequest, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public static void Marshal(ReplicatedLockTokenRequest tokenRequest, WritableChannel channel) { channel.PutInt(tokenRequest.Id()); (new MemberId.Marshal()).marshal(tokenRequest.Owner(), channel); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(java.util.concurrent.atomic.AtomicInteger state, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException public override void Marshal(AtomicInteger state, WritableChannel channel) { channel.PutInt(state.intValue()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void marshal(TermState termState, org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException //JAVA TO C# CONVERTER NOTE: Members cannot have the same name as their enclosing type: public override void MarshalConflict(TermState termState, WritableChannel channel) { channel.PutLong(termState.CurrentTerm()); }
public override abstract void Marshal(STATE state, Org.Neo4j.Storageengine.Api.WritableChannel channel);
public StorageCommandSerializer(WritableChannel channel) { this._channel = channel; }