*) Minor changes to userDB

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@824 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent af7829df25
commit d9c08a47f9

@ -205,6 +205,10 @@ public class userDB {
return 0;
}
public Long getTimeLimit() {
return (this.mem.containsKey(TIME_LIMIT)?Long.valueOf((String)this.mem.get(TIME_LIMIT)):null);
}
public long updateLastAccess(long timeStamp, boolean decrementTimeUsed) {
if (timeStamp < 0) throw new IllegalArgumentException();
@ -215,7 +219,7 @@ public class userDB {
if (decrementTimeUsed) {
if ((lastAccess == null)||((lastAccess != null)||(lastAccess.longValue()-timeStamp>1000))) {
this.mem.put(TIME_USED,new Long(newTimeUsed = ++oldTimeUsed));
this.mem.put(TIME_USED,Long.toString(newTimeUsed = ++oldTimeUsed));
}
}
this.mem.put(LAST_ACCESS,Long.toString(timeStamp));

Loading…
Cancel
Save