|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.core.datetime.RequestTimeThreadLocal
public class RequestTimeThreadLocal
A thread-local for storing the time a request was received. This timestamp can be used for consistent date-time handling across all operations performed within the scope of a single request.
Constructor Summary | |
---|---|
RequestTimeThreadLocal()
|
Method Summary | |
---|---|
static void |
clearTime()
Clears the stored value of the thread-local. |
static long |
getTime()
Retrieves the value of the request time thread-local. |
static java.util.Date |
getTimeOrNow()
Returns the value of the request time thread-local converted to a new Date object. |
static void |
setTime(long currentTimeMillis)
Sets the value of the thread-local. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestTimeThreadLocal()
Method Detail |
---|
public static void setTime(long currentTimeMillis)
currentTimeMillis
- the timestamp to store, measured in milliseconds since the epoch
defined by Date.Date(long)
.public static void clearTime()
setTime(long)
.
public static long getTime()
Date.Date(long)
.
public static java.util.Date getTimeOrNow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |