Package org.onosproject.net.pi.runtime
Class PiCloneSessionEntry.Builder
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiCloneSessionEntry.Builder
-
- Enclosing class:
- PiCloneSessionEntry
public static final class PiCloneSessionEntry.Builder extends java.lang.Object
Builder of PI clone session entries.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiCloneSessionEntry.Builder
addReplica(PiPreReplica replica)
Adds the given packet replica to this clone session.PiCloneSessionEntry.Builder
addReplicas(java.util.Collection<PiPreReplica> replicas)
Adds the given packet replicas to this clone session.PiCloneSessionEntry
build()
Returns a new clone session entry.PiCloneSessionEntry.Builder
withClassOfService(int classOfService)
Sets the class of service of this clone session.PiCloneSessionEntry.Builder
withMaxPacketLengthBytes(int maxPacketLengthBytes)
Sets the maximum length in bytes of cloned packets.PiCloneSessionEntry.Builder
withSessionId(int sessionId)
Sets the identifier of this clone session.
-
-
-
Method Detail
-
withSessionId
public PiCloneSessionEntry.Builder withSessionId(int sessionId)
Sets the identifier of this clone session.- Parameters:
sessionId
- session ID- Returns:
- this
-
addReplica
public PiCloneSessionEntry.Builder addReplica(PiPreReplica replica)
Adds the given packet replica to this clone session.- Parameters:
replica
- packet replica- 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
-
withClassOfService
public PiCloneSessionEntry.Builder withClassOfService(int classOfService)
Sets the class of service of this clone session. If not set, the default valuePiCloneSessionEntry.DEFAULT_CLASS_OF_SERVICE
will be used.- Parameters:
classOfService
- class of service value- Returns:
- this
-
withMaxPacketLengthBytes
public PiCloneSessionEntry.Builder withMaxPacketLengthBytes(int maxPacketLengthBytes)
Sets the maximum length in bytes of cloned packets. If not set, the default valuePiCloneSessionEntry.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
-
-