public class MemoryReplayCache extends Object implements ReplayCache
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_TTL |
static long |
MAX_TTL |
Constructor and Description |
---|
MemoryReplayCache() |
Modifier and Type | Method and Description |
---|---|
void |
add(String identifier)
Add the given identifier to the cache.
|
void |
add(String identifier,
long timeToLive)
Add the given identifier to the cache to be cached for the given time
|
void |
close() |
boolean |
contains(String identifier)
Return true if the given identifier is contained in the cache
|
protected void |
processTokenExpiry() |
public static final long DEFAULT_TTL
public static final long MAX_TTL
public void add(String identifier)
add
in interface ReplayCache
identifier
- The identifier to be addedpublic void add(String identifier, long timeToLive)
add
in interface ReplayCache
identifier
- The identifier to be addedtimeToLive
- The length of time to cache the Identifier in secondspublic boolean contains(String identifier)
contains
in interface ReplayCache
identifier
- The identifier to checkprotected void processTokenExpiry()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2017 JBoss by Red Hat. All rights reserved.