MCPcopy Create free account
hub / github.com/apache/tomcat / serialize

Method serialize

java/org/apache/catalina/tribes/io/XByteBuffer.java:752–758  ·  view source on GitHub ↗

Serializes a message into cluster data @param msg ClusterMessage @return serialized content as byte[] array @throws IOException Serialization error

(Serializable msg)

Source from the content-addressed store, hash-verified

750 * @throws IOException Serialization error
751 */
752 public static byte[] serialize(Serializable msg) throws IOException {
753 ByteArrayOutputStream outs = new ByteArrayOutputStream();
754 ObjectOutputStream out = new ObjectOutputStream(outs);
755 out.writeObject(msg);
756 out.flush();
757 return outs.toByteArray();
758 }
759
760 /**
761 * Sets the discard flag for invalid packages.

Callers 4

sendMethod · 0.95
setValueMethod · 0.95
setKeyMethod · 0.95

Calls 3

toByteArrayMethod · 0.95
flushMethod · 0.65
writeObjectMethod · 0.45

Tested by 1