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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
build()
Builds the object after all configuration has been set.int
int
int
static SocketPerformancePreferences
void
setBandwidth
(int bandwidth) void
setConnectionTime
(int connectionTime) void
setLatency
(int latency) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.logging.log4j.core.util.Builder
getErrorPrefix, isValid
-
Constructor Details
-
SocketPerformancePreferences
public SocketPerformancePreferences()
-
-
Method Details
-
newBuilder
-
apply
-
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) -
toString
-