| java.lang.Object | |
| ↳ | com.atlassian.confluence.core.datetime.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.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Clears the stored value of the thread-local.
| |||||||||||
Retrieves the value of the request time thread-local.
| |||||||||||
Returns the value of the request time thread-local converted to a new Date object.
| |||||||||||
Sets the value of the thread-local.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Clears the stored value of the thread-local. Should not be called by application code, but rather by
the finally block in the servlet filter which calls setTime(long).
Retrieves the value of the request time thread-local. The value is measured in milliseconds
since the epoch defined by Date(long).
Returns the value of the request time thread-local converted to a new Date object. If the thread-local is not set, returns a new Date representing the current time.
Sets the value of the thread-local. Should not be called by application code, but rather by a servlet filter which handles each request.
| currentTimeMillis | the timestamp to store, measured in milliseconds since the epoch
defined by Date(long).
|
|---|

