All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.activemq.artemis.shaded.org.jgroups.util.Streamable Maven / Gradle / Ivy

There is a newer version: 2.33.0
Show newest version
package org.apache.activemq.artemis.shaded.org.jgroups.util;

import java.io.DataInput;
import java.io.DataOutput;

/**
 * Implementations of Streamable can add their state directly to the output stream, enabling them to bypass costly
 * serialization
 * @author Bela Ban
 */
public interface Streamable {

    /** Write the entire state of the current object (including superclasses) to outstream.
     * Note that the output stream must not be closed */
    void writeTo(DataOutput out) throws Exception;

    /** Read the state of the current object (including superclasses) from instream
     * Note that the input stream must not be closed */
    void readFrom(DataInput in) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy