@Test public void neverAddedRemove() { AuthTicketCache tokens = new AuthTicketCache(); assertThat(tokens.remove("user","foo"), is(false)); }
public boolean remove(final String user, final String token) { synchronized (lock) { expireTokens(); Long tmp = tokens.remove(new UserAuthToken(user, token)); return tmp != null; } }
AuthTicketCache extends ComponentSupport { public boolean remove(final String user, final String token) { synchronized (lock) { expireTokens(); Long tmp = tokens.remove(new UserAuthToken(user, token)); return tmp != null; } } }
AuthTicketCache extends ComponentSupport { public boolean remove(final String user, final String token) { synchronized (lock) { expireTokens(); Long tmp = tokens.remove(new UserAuthToken(user, token)); return tmp != null; } } @Inject  AuthTicketCache(@Named(CPREFIX + ".expireAfter:-20s}") final Time expireAfter); @VisibleForTesting  AuthTicketCache(); }
AuthTicketCache extends ComponentSupport { public boolean remove(final String user, final String token) { synchronized (lock) { expireTokens(); Long tmp = tokens.remove(new UserAuthToken(user, token)); return tmp != null; } } @Inject  AuthTicketCache(@Named(CPREFIX + ".expireAfter:-20s}") final Time expireAfter); @VisibleForTesting  AuthTicketCache(); void add(final String user, final String token); boolean remove(final String user, final String token); }
AuthTicketCache extends ComponentSupport { public boolean remove(final String user, final String token) { synchronized (lock) { expireTokens(); Long tmp = tokens.remove(new UserAuthToken(user, token)); return tmp != null; } } @Inject  AuthTicketCache(@Named(CPREFIX + ".expireAfter:-20s}") final Time expireAfter); @VisibleForTesting  AuthTicketCache(); void add(final String user, final String token); boolean remove(final String user, final String token);  }