
package org.apache.airavata.service.security.authzcache;

/**
 * Cache entry in the default authorization cache.
 */
public class AuthzCacheEntry {
    //authorization decision for the authorization request associated with this cache entry.
    private boolean decision;
    //time to live value for the access token in seconds.
    private long expiryTime;
    //time stamp in milli seconds at the time this entry is put into the cache
    private long entryTimestamp;

    public AuthzCacheEntry(boolean decision, long expiryTime, long entryTimestamp) {
        this.decision = decision;
        this.expiryTime = expiryTime;
        this.entryTimestamp = entryTimestamp;
    }

    public long getEntryTimestamp() {
        return entryTimestamp;
    }

    public void setEntryTimestamp(long entryTimestamp) {
        this.entryTimestamp = entryTimestamp;
    }

    public long getExpiryTime() {
        return expiryTime;
    }

    public void setExpiryTime(long timestamp) {
        this.expiryTime = timestamp;
    }

    public boolean getDecision() {
        return decision;
    }

    public void setDecision(boolean decision) {
        this.decision = decision;
    }
}
