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 viaSocket.setPerformancePreferences(int, int, int)
.The
Socket.setPerformancePreferences(int, int, int)
API may not be implemented by a JRE.
-
-
Constructor Summary
Constructors Constructor Description SocketPerformancePreferences()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Socket socket)
SocketPerformancePreferences
build()
Builds the object after all configuration has been set.int
getBandwidth()
int
getConnectionTime()
int
getLatency()
static SocketPerformancePreferences
newBuilder()
void
setBandwidth(int bandwidth)
void
setConnectionTime(int connectionTime)
void
setLatency(int latency)
String
toString()
-
-
-
Method Detail
-
newBuilder
@PluginBuilderFactory public static SocketPerformancePreferences newBuilder()
-
apply
public void apply(Socket socket)
-
build
public SocketPerformancePreferences build()
Description copied from interface:Builder
Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
build
in 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)
-
-