public class MaybeSerializedSignedTransaction implements NamedByHash
In the words of Matt working code is more important then pretty code. This class that contains code that may be serialized. If it were always serialized then the local disk fetch would need to serialize then de-serialize which wastes time. However over the wire we get batch fetch items serialized. This is because we need to get the exact length of the objects to pack them into the 10MB max message size buffer. We do not want to serialize them multiple times so it's a lot more efficient to send the byte stream.
Constructor and Description |
---|
MaybeSerializedSignedTransaction(SecureHash id,
SerializedBytes<net.corda.core.transactions.SignedTransaction> serialized,
SignedTransaction nonSerialised)
In the words of Matt working code is more important then pretty code. This class that contains code that may
be serialized. If it were always serialized then the local disk fetch would need to serialize then de-serialize
which wastes time. However over the wire we get batch fetch items serialized. This is because we need to get the exact
length of the objects to pack them into the 10MB max message size buffer. We do not want to serialize them multiple times
so it's a lot more efficient to send the byte stream.
|
Modifier and Type | Method and Description |
---|---|
SignedTransaction |
get() |
SecureHash |
getId() |
SignedTransaction |
getNonSerialised() |
SerializedBytes<net.corda.core.transactions.SignedTransaction> |
getSerialized() |
boolean |
isNull() |
java.lang.String |
payloadContentDescription() |
int |
serializedByteCount() |
getId
public MaybeSerializedSignedTransaction(SecureHash id, SerializedBytes<net.corda.core.transactions.SignedTransaction> serialized, SignedTransaction nonSerialised)
In the words of Matt working code is more important then pretty code. This class that contains code that may be serialized. If it were always serialized then the local disk fetch would need to serialize then de-serialize which wastes time. However over the wire we get batch fetch items serialized. This is because we need to get the exact length of the objects to pack them into the 10MB max message size buffer. We do not want to serialize them multiple times so it's a lot more efficient to send the byte stream.
public SignedTransaction get()
public boolean isNull()
public int serializedByteCount()
public java.lang.String payloadContentDescription()
public SecureHash getId()
public SerializedBytes<net.corda.core.transactions.SignedTransaction> getSerialized()
public SignedTransaction getNonSerialised()