Class PiCloneSessionEntry.Builder

  • Enclosing class:
    PiCloneSessionEntry

    public static final class PiCloneSessionEntry.Builder
    extends java.lang.Object
    Builder of PI clone session entries.
    • Method Detail

      • withSessionId

        public PiCloneSessionEntry.Builder withSessionId​(int sessionId)
        Sets the identifier of this clone session.
        Parameters:
        sessionId - session ID
        Returns:
        this
      • addReplicas

        public PiCloneSessionEntry.Builder addReplicas​(java.util.Collection<PiPreReplica> replicas)
        Adds the given packet replicas to this clone session.
        Parameters:
        replicas - packet replicas
        Returns:
        this
      • withMaxPacketLengthBytes

        public PiCloneSessionEntry.Builder withMaxPacketLengthBytes​(int maxPacketLengthBytes)
        Sets the maximum length in bytes of cloned packets. If not set, the default value PiCloneSessionEntry.DO_NOT_TRUNCATE will be used.
        Parameters:
        maxPacketLengthBytes - max length in bytes of cloned packets
        Returns:
        this
      • build

        public PiCloneSessionEntry build()
        Returns a new clone session entry.
        Returns:
        clone session entry