Adding CacheEntry to be used by the APIClient cache

This commit is contained in:
Amnon Heiman 2015-10-06 12:41:46 +03:00
parent a90e080ee6
commit 38af24d49d

View File

@ -0,0 +1,20 @@
/*
* Copyright 2015 Cloudius Systems
*/
package com.cloudius.urchin.api;
public class CacheEntry {
long time;
public String value;
CacheEntry(String value) {
time = System.currentTimeMillis();
this.value = value;
}
public boolean valid(long duration) {
return (System.currentTimeMillis() - time) < duration;
}
}