Package org.apache.ofbiz.base.concurrent
Class ExecutionPool.Pulse
- java.lang.Object
-
- org.apache.ofbiz.base.concurrent.ExecutionPool.Pulse
-
- All Implemented Interfaces:
java.lang.Comparable<java.util.concurrent.Delayed>
,java.lang.Runnable
,java.util.concurrent.Delayed
- Direct Known Subclasses:
CacheLine
- Enclosing class:
- ExecutionPool
public abstract static class ExecutionPool.Pulse extends java.lang.Object implements java.util.concurrent.Delayed, java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description protected long
expireTimeNanos
protected long
loadTimeNanos
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(java.util.concurrent.Delayed other)
boolean
equals(java.lang.Object other)
long
getDelay(java.util.concurrent.TimeUnit unit)
long
getExpireTimeNanos()
long
getLoadTimeNanos()
int
hashCode()
long
timeDiff(ExecutionPool.Pulse other)
Calculates the difference between this.expireTimeNanos and other.expireTimeNanos
-
-
-
Method Detail
-
getLoadTimeNanos
public long getLoadTimeNanos()
-
getExpireTimeNanos
public long getExpireTimeNanos()
-
getDelay
public final long getDelay(java.util.concurrent.TimeUnit unit)
- Specified by:
getDelay
in interfacejava.util.concurrent.Delayed
-
compareTo
public final int compareTo(java.util.concurrent.Delayed other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<java.util.concurrent.Delayed>
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
timeDiff
public long timeDiff(ExecutionPool.Pulse other)
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
-
-