Class SocketPerformancePreferences
java.lang.Object
org.apache.logging.log4j.core.net.SocketPerformancePreferences
- All Implemented Interfaces:
Cloneable,Builder<SocketPerformancePreferences>
@Plugin(name="SocketPerformancePreferences",
category="Core",
printObject=true)
public class SocketPerformancePreferences
extends Object
implements Builder<SocketPerformancePreferences>, Cloneable
Holds all socket options settable via
Socket.setPerformancePreferences(int, int, int).
The Socket.setPerformancePreferences(int, int, int) API may not be implemented by a JRE.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()Builds the object after all configuration has been set.intintintstatic SocketPerformancePreferencesvoidsetBandwidth(int bandwidth) voidsetConnectionTime(int connectionTime) voidsetLatency(int latency) toString()
-
Field Details
-
bandwidth
-
connectionTime
-
latency
-
-
Constructor Details
-
SocketPerformancePreferences
public SocketPerformancePreferences()
-
-
Method Details
-
newBuilder
-
apply
-
build
Description copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
buildin interfaceBuilder<SocketPerformancePreferences>- Returns:
- the configured instance.
-
getBandwidth
public int getBandwidth() -
getConnectionTime
public int getConnectionTime() -
getLatency
public int getLatency() -
setBandwidth
public void setBandwidth(int bandwidth) -
setConnectionTime
public void setConnectionTime(int connectionTime) -
setLatency
public void setLatency(int latency) -
toString
-