use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisProxyGrantingTicketServices method get.
@Override
public Ticket get(String ticketId) {
RedisConnection conn = connectionFactory.getConnection();
Ticket ticket = conn.getObject(PREFIX + ticketId);
conn.close();
return ticket;
}
use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisTicketServices method store.
@Override
public void store(String ticketId, Ticket ticket, int validitySeconds) {
RedisConnection conn = connectionFactory.getConnection();
conn.setexObject(prefixTicketId(ticketId), validitySeconds, ticket);
conn.close();
}
use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisOnlineTicketServices method remove.
@Override
public OnlineTicket remove(String ticketId) {
RedisConnection conn = connectionFactory.getConnection();
OnlineTicket ticket = conn.getObject(PREFIX + ticketId);
conn.delete(PREFIX + ticketId);
conn.close();
return ticket;
}
use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisOnlineTicketServices method get.
@Override
public OnlineTicket get(String ticketId) {
RedisConnection conn = connectionFactory.getConnection();
OnlineTicket ticket = conn.getObject(PREFIX + ticketId);
conn.close();
return ticket;
}
use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisRemeberMeService method read.
@Override
public RemeberMe read(RemeberMe remeberMe) {
RedisConnection conn = connectionFactory.getConnection();
RemeberMe readRemeberMe = (RemeberMe) conn.getObject(PREFIX + remeberMe.getUsername());
conn.close();
return readRemeberMe;
}
Aggregations