*/
public abstract class AbstractState implements State {
+ /** The time of this state. */
+ private final long time;
+
/** Whether the state was successfully retrieved. */
private final boolean success;
* The exception that occured while retrieving the state
*/
protected AbstractState(boolean success, Throwable exception) {
+ this.time = System.currentTimeMillis();
this.success = success;
this.exception = exception;
}
* {@inheritDoc}
*/
@Override
+ public long time() {
+ return time;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
public boolean success() {
return success;
}