abstract class TickingThread implements Runnable
Class TickingThread. Provides tickingthread functionality for the Hytale server.
java.lang.Object > TickingThread
Field Summary
tps
private
int
tps
Field tps.
tickStepNanos
private
int
tickStepNanos
Field tickStepNanos.
bufferedTickLengthMetricSet
private
HistoricMetric
bufferedTickLengthMetricSet
Field bufferedTickLengthMetricSet.
thread
private
Thread
thread
Field thread.
startedFuture
private
CompletableFuture
startedFuture
Field startedFuture.
tickLength
final
long
tickLength
Field tickLength.
sb
final
StringBuilder
sb
Field sb.
Method Detail
TickingThread
public
public
TickingThread
(final String threadName)
Method TickingThread.
- Parameters:
final StringthreadName
run
public
void
run
()
Method run.
isIdle
protected
boolean
isIdle
()
Method isIdle.
onStart
protected
void
onStart
()
Method onStart.
start
public
CompletableFuture
start
()
Method start.
Thread
public
new
Thread
(this, this.threadName)
Method Thread.
- Parameters:
thisthisthis.threadNamethis.threadName
if
public
else
if
(this.thread.isAlive()
Method if.
- Parameters:
this.thread.isAlive(this.thread.isAlive(
IllegalStateException
public
new
IllegalStateException
("Thread '" + this.thread.getName()
Method IllegalStateException.
- Parameters:
"Thread '" +this.thread.getName(
interrupt
public
boolean
interrupt
()
Method interrupt.
stop
public
void
stop
()
Method stop.
setTps
public
void
setTps
(final int tps)
Method setTps.
- Parameters:
final inttps
IllegalArgumentException
public
new
IllegalArgumentException
("UpdatesPerSecond is out of bounds (<=0 or >2048)
Method IllegalArgumentException.
- Parameters:
"UpdatesPerSecond is out of bounds (<=0 or>2048
getTps
public
int
getTps
()
Method getTps.
getTickStepNanos
public
int
getTickStepNanos
()
Method getTickStepNanos.
getBufferedTickLengthMetricSet
Method getBufferedTickLengthMetricSet.
clearMetrics
public
void
clearMetrics
()
Method clearMetrics.
debugAssertInTickingThread
public
void
debugAssertInTickingThread
()
Method debugAssertInTickingThread.
AssertionError
public
new
AssertionError
((Object)
Method AssertionError.
- Parameters:
(Object(Object
isInThread
public
boolean
isInThread
()
Method isInThread.
isStarted
public
boolean
isStarted
()
Method isStarted.
setThread
protected
void
setThread
(final Thread thread)
Method setThread.
- Parameters:
final Threadthread
getThread
protected
Thread
getThread
()
Method getThread.