ReplicatedPermissions.java 826 Bytes
package com.mumfrey.liteloader.permissions;

/**
 * Represents a set of permissions assigned by a remote authority such as a server
 *
 * @author Adam Mummery-Smith
 */
public interface ReplicatedPermissions extends Permissions
{
	/**
	 * Get the time that this object was received from the remote authority
	 * 
	 * @return
	 */
	public abstract long getReplicationTime();
	
	/**
	 * True if this permissions object is valid (within cache period)
	 * 
	 * @return
	 */
	public abstract boolean isValid();
	
	/**
	 * Forcibly invalidate this permission container, forces update at the next opportunity
	 */
	public abstract void invalidate();

	/**
	 * Temporarily forces the permissions object to be valid to prevent repeated revalidation
	 */
	public abstract void notifyRefreshPending();
}