home *** CD-ROM | disk | FTP | other *** search
- package org.xbill.DNS;
-
- abstract class Cache$Element implements TypedObject {
- int credibility;
- int expire;
-
- protected void setValues(int credibility, long ttl) {
- this.credibility = credibility;
- this.expire = (int)(System.currentTimeMillis() / 1000L + ttl);
- if (this.expire < 0 || this.expire > Integer.MAX_VALUE) {
- this.expire = Integer.MAX_VALUE;
- }
-
- }
-
- public final boolean expired() {
- int now = (int)(System.currentTimeMillis() / 1000L);
- return now >= this.expire;
- }
-
- public abstract int getType();
- }
-