APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.krb5.internal.rcache

public Class AuthList

extends Object
Class Inheritance
Imports
sun.security.krb5.internal.Krb5, .KerberosTime, .KrbApErrException, java.util.Iterator, .LinkedList, .ListIterator

This class provides an efficient caching mechanism to store AuthTimeWithHash from client authenticators. The cache minimizes the memory usage by doing self-cleanup of expired items in the cache. AuthTimeWithHash objects inside a cache are always sorted from big (new) to small (old) as determined by AuthTimeWithHash#compareTo. In the most common case a newcomer should be newer than the first element.
Author
Yanni Zhang

Field Summary

Modifier and TypeField and Description
private final LinkedList<AuthTimeWithHash>
private final int
private volatile int

Constructor Summary

AccessConstructor and Description
public
AuthList(int lifespan)

Constructs a AuthList.

Method Summary

Modifier and TypeMethod and Description
public boolean
public synchronized void
put(AuthTimeWithHash t, KerberosTime currentTime)

Puts the authenticator timestamp into the cache in descending order, and throw an exception if it's already there.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

entriesback to summary
private final LinkedList<AuthTimeWithHash> entries
lifespanback to summary
private final int lifespan
oldestTimeback to summary
private volatile int oldestTime

Constructor Detail

AuthListback to summary
public AuthList(int lifespan)

Constructs a AuthList.

Method Detail

isEmptyback to summary
public boolean isEmpty()
putback to summary
public synchronized void put(AuthTimeWithHash t, KerberosTime currentTime) throws KrbApErrException

Puts the authenticator timestamp into the cache in descending order, and throw an exception if it's already there.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.