Package org.apache.ofbiz.base.concurrent
Class ExecutionPool.Pulse
java.lang.Object
org.apache.ofbiz.base.concurrent.ExecutionPool.Pulse
- All Implemented Interfaces:
Comparable<Delayed>
,Runnable
,Delayed
- Direct Known Subclasses:
CacheLine
- Enclosing class:
- ExecutionPool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
final boolean
final long
long
Gets expire time nanos.long
Gets load time nanos.int
hashCode()
long
timeDiff
(ExecutionPool.Pulse other) Calculates the difference between this.expireTimeNanos and other.expireTimeNanos
-
Constructor Details
-
Pulse
protected Pulse(long delayNanos) -
Pulse
protected Pulse(long loadTimeNanos, long delayNanos)
-
-
Method Details
-
getLoadTimeNanos
public long getLoadTimeNanos()Gets load time nanos.- Returns:
- the load time nanos
-
getExpireTimeNanos
public long getExpireTimeNanos()Gets expire time nanos.- Returns:
- the expire time nanos
-
getDelay
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Delayed>
-
equals
-
hashCode
public int hashCode() -
timeDiff
Calculates the difference between this.expireTimeNanos and other.expireTimeNanos- Parameters:
other
- used to calculate the difference- Returns:
- the time difference of the two instance's expireTimeNanos
-