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

org.jgroups.protocols.ProtPerfHeader Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

The newest version!
package org.jgroups.protocols;

import org.jgroups.Header;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.function.Supplier;

/**
 * @author Bela Ban
 * @since  5.2.7
 */
public class ProtPerfHeader extends Header {
    public static final short ID=1505; // dummy protocol ID to get the ProtPerfHeader from a message

    protected long start_down; // us
    protected long start_up;   // us


    public ProtPerfHeader() {
    }

    public Supplier create()          {return ProtPerfHeader::new;}
    public short                      getMagicId()      {return 98;}
    public int                        serializedSize()  {return 0;}
    public long                       startDown()       {return start_down;}
    public ProtPerfHeader             startDown(long t) {this.start_down=t; return this;}
    public long                       startUp()         {return start_up;}
    public ProtPerfHeader             startUp(long t)   {this.start_up=t; return this;}


    /** The contents of this header is not serialized */
    public void writeTo(DataOutput out) throws IOException {
    }

    public void readFrom(DataInput in) throws IOException, ClassNotFoundException {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy