public final class DefaultTicketRegistry extends AbstractTicketRegistry implements TicketRegistryState
log| Constructor and Description |
|---|
DefaultTicketRegistry() |
DefaultTicketRegistry(int initialCapacity,
float loadFactor,
int concurrencyLevel)
Creates a new, empty registry with the specified initial capacity, load
factor, and concurrency level.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTicket(Ticket ticket)
Add a ticket to the registry.
|
boolean |
deleteTicket(String ticketId)
Remove a specific ticket from the registry.
|
Ticket |
getTicket(String ticketId)
Retrieve a ticket from the registry.
|
Collection<Ticket> |
getTickets()
Retrieve all tickets from the registry.
|
int |
serviceTicketCount()
Computes the number of service tickets stored in the ticket registry.
|
int |
sessionCount()
Computes the number of SSO sessions stored in the ticket registry.
|
getTicketpublic DefaultTicketRegistry()
public DefaultTicketRegistry(int initialCapacity,
float loadFactor,
int concurrencyLevel)
initialCapacity - - the initial capacity. The implementation
performs internal sizing to accommodate this many elements.loadFactor - - the load factor threshold, used to control resizing.
Resizing may be performed when the average number of elements per bin
exceeds this threshold.concurrencyLevel - - the estimated number of concurrently updating
threads. The implementation performs internal sizing to try to
accommodate this many threads.public void addTicket(Ticket ticket)
TicketRegistryaddTicket in interface TicketRegistryticket - The ticket we wish to add to the cache.IllegalArgumentException - if the Ticket is null.public Ticket getTicket(String ticketId)
TicketRegistrygetTicket in interface TicketRegistryticketId - the id of the ticket we wish to retrievepublic boolean deleteTicket(String ticketId)
TicketRegistrydeleteTicket in interface TicketRegistryticketId - The id of the ticket to delete.public Collection<Ticket> getTickets()
TicketRegistrygetTickets in interface TicketRegistrypublic int sessionCount()
TicketRegistryStatesessionCount in interface TicketRegistryStatepublic int serviceTicketCount()
TicketRegistryStateserviceTicketCount in interface TicketRegistryStateCopyright © 2004-2012 Jasig. All Rights Reserved.