public class InMemoryReplayCache extends Thread implements ReplayCache
| Modifier and Type | Class and Description |
|---|---|
class |
InMemoryReplayCache.ReplayCacheEntry
A structure to hold an entry
|
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
InMemoryReplayCache()
Creates a new instance of InMemoryReplayCache.
|
InMemoryReplayCache(int delay)
Creates a new instance of InMemoryReplayCache.
|
InMemoryReplayCache(long clockSkew)
Creates a new instance of InMemoryReplayCache.
|
InMemoryReplayCache(long clockSkew,
int delay)
Creates a new instance of InMemoryReplayCache.
|
| Modifier and Type | Method and Description |
|---|---|
Map<KerberosPrincipal,List<InMemoryReplayCache.ReplayCacheEntry>> |
getCache() |
boolean |
isReplay(KerberosPrincipal serverPrincipal,
KerberosPrincipal clientPrincipal,
KerberosTime clientTime,
int clientMicroSeconds)
Check if an entry is a replay or not.
|
void |
run()
The cleaning thread.
|
void |
save(KerberosPrincipal serverPrincipal,
KerberosPrincipal clientPrincipal,
KerberosTime clientTime,
int clientMicroSeconds)
Add a new entry into the cache.
|
void |
setClockSkew(long clockSkew)
Sets the clock skew.
|
void |
setDelay(long delay)
Set the delay between each cleaning thread run.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic InMemoryReplayCache()
public InMemoryReplayCache(long clockSkew)
clockSkew - the allowed skew (milliseconds)public InMemoryReplayCache(long clockSkew,
int delay)
clockSkew - the allowed skew (milliseconds)delay - the interval between each run of the cache
cleaning thread (milliseconds)public InMemoryReplayCache(int delay)
delay - the interval between each run of the cache
cleaning thread (milliseconds).public void setClockSkew(long clockSkew)
clockSkew - public void setDelay(long delay)
delay - delay in millisecondspublic boolean isReplay(KerberosPrincipal serverPrincipal, KerberosPrincipal clientPrincipal, KerberosTime clientTime, int clientMicroSeconds)
isReplay in interface ReplayCacheserverPrincipal - The server principalclientPrincipal - The client principalclientTime - The client timeclientMicroSeconds - The client microsecondpublic void save(KerberosPrincipal serverPrincipal, KerberosPrincipal clientPrincipal, KerberosTime clientTime, int clientMicroSeconds)
save in interface ReplayCacheserverPrincipal - The server principalclientPrincipal - The client principalclientTime - The client timeclientMicroSeconds - The client microsecondpublic Map<KerberosPrincipal,List<InMemoryReplayCache.ReplayCacheEntry>> getCache()
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.