public class ServerSettings
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static long |
serialVersionUID
For interoperability with possible future changes.
|
| Constructor and Description |
|---|
ServerSettings(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
int maxTasks) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Returns whether an instance of this class is equals to the one passed as
a parameter or not.
|
int |
getCorePoolSize()
Obtains the core number of threads.
|
long |
getKeepAliveTime()
Returns the thread keep-alive time (in milliseconds), which is the amount
of time which threads in excess of the core pool size may remain idle
before being terminated.
|
int |
getMaxPoolSize()
Obtains the maximum allowed number of threads.
|
int |
getMaxTasks()
Obtains the maximum allowed number of tasks.
|
int |
hashCode()
Returns the hash code of an instance of this class.
|
void |
setCorePoolSize(int corePoolSize)
Sets the core number of threads.
|
void |
setKeepAliveTime(long keepAliveTime)
Sets the time limit (in milliseconds) for which threads may remain idle
before being terminated.
|
void |
setMaxPoolSize(int maxPoolSize)
Sets the maximum allowed number of threads.
|
void |
setMaxTasks(int maxTasks)
Sets the maximum allowed number of tasks.
|
java.lang.String |
toString() |
protected static final long serialVersionUID
public ServerSettings(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
int maxTasks)
public int getCorePoolSize()
public void setCorePoolSize(int corePoolSize)
corePoolSize
and maxPoolSize the same, you create a fixed-size thread
pool.corePoolSize - the corePoolSize to setpublic int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
corePoolSize and maxPoolSize the same, you
create a fixed-size thread pool. By setting maxPoolSize to
an essentially unbounded value such as Integer.MAX_VALUE, it allows the
pool to accommodate an arbitrary number of concurrent tasks.maxPoolSize - the maxPoolSize to setpublic long getKeepAliveTime()
public void setKeepAliveTime(long keepAliveTime)
keepAliveTime - the keepAliveTime to setpublic int getMaxTasks()
public void setMaxTasks(int maxTasks)
maxTasks - the maxTasks to setpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - the instance to be compared to.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2024 Denodo Technologies. All rights reserved.