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 Object
Builder of PI clone session entries. 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiCloneSessionEntry.BuilderaddReplica(PiPreReplica replica)Adds the given packet replica to this clone session.PiCloneSessionEntry.BuilderaddReplicas(Collection<PiPreReplica> replicas)Adds the given packet replicas to this clone session.PiCloneSessionEntrybuild()Returns a new clone session entry.PiCloneSessionEntry.BuilderwithClassOfService(int classOfService)Sets the class of service of this clone session.PiCloneSessionEntry.BuilderwithMaxPacketLengthBytes(int maxPacketLengthBytes)Sets the maximum length in bytes of cloned packets.PiCloneSessionEntry.BuilderwithSessionId(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(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_SERVICEwill 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_TRUNCATEwill 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
 
 
 - 
 
 -