Commit 0516e2bc authored by Misagh Moayyed's avatar Misagh Moayyed
Browse files

updated docs

parent fb98c5a9
......@@ -205,6 +205,8 @@ public final class EhCacheTicketRegistry extends AbstractCrypticTicketRegistry i
@Override
public void afterPropertiesSet() throws Exception {
logger.info("Setting up Ehcache Ticket Registry...");
if (this.serviceTicketsCache == null || this.ticketGrantingTicketsCache == null) {
throw new BeanInstantiationException(this.getClass(),
"Both serviceTicketsCache and ticketGrantingTicketsCache are required properties.");
......
......@@ -69,17 +69,13 @@ public class HazelcastTicketRegistry extends AbstractCrypticTicketRegistry imple
this.hz = hz;
}
/**
* {@inheritDoc}
*/
@Override
protected void updateTicket(final Ticket ticket) {
addTicket(ticket);
}
/**
* {@inheritDoc}
*/
@Override
protected boolean needsCallback() {
return false;
......@@ -102,9 +98,6 @@ public class HazelcastTicketRegistry extends AbstractCrypticTicketRegistry imple
logger.debug("ST timeout: [{}s]", serviceTicketTimeoutInSeconds);
}
/**
* {@inheritDoc}
*/
@Override
public void addTicket(final Ticket ticket) {
addTicket(ticket, getTimeout(ticket));
......@@ -121,9 +114,7 @@ public class HazelcastTicketRegistry extends AbstractCrypticTicketRegistry imple
this.registry.set(encTicket.getId(), encTicket, ttl, TimeUnit.SECONDS);
}
/**
* {@inheritDoc}
*/
@Override
public Ticket getTicket(final String ticketId) {
final String encTicketId = encodeTicketId(ticketId);
......@@ -131,9 +122,7 @@ public class HazelcastTicketRegistry extends AbstractCrypticTicketRegistry imple
return decodeTicket(ticket);
}
/**
* {@inheritDoc}
*/
@Override
public boolean deleteTicket(final String ticketId) {
final String encTicketId = encodeTicketId(ticketId);
......@@ -141,9 +130,6 @@ public class HazelcastTicketRegistry extends AbstractCrypticTicketRegistry imple
return this.registry.remove(encTicketId) != null;
}
/**
* {@inheritDoc}
*/
@Override
public Collection<Ticket> getTickets() {
return decodeTickets(this.registry.values());
......
......@@ -71,6 +71,8 @@ public final class MemCacheTicketRegistry extends AbstractCrypticTicketRegistry
*/
public MemCacheTicketRegistry(final String[] hostnames, final int ticketGrantingTicketTimeOut,
final int serviceTicketTimeOut) {
logger.info("Setting up Memcached Ticket Registry...");
try {
this.client = new MemcachedClient(AddrUtil.getAddresses(Arrays.asList(hostnames)));
} catch (final IOException e) {
......@@ -185,6 +187,7 @@ public final class MemCacheTicketRegistry extends AbstractCrypticTicketRegistry
*
* @throws Exception the exception
*/
@Override
public void destroy() throws Exception {
this.client.shutdown();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment