use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisProxyGrantingTicketServices method store.
@Override
public void store(String ticketId, Ticket ticket, int validitySeconds) {
RedisConnection conn = connectionFactory.getConnection();
conn.setexObject(PREFIX + ticketId, validitySeconds, ticket);
conn.close();
}
use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisTicketServices method remove.
@Override
public Ticket remove(String ticketId) {
RedisConnection conn = connectionFactory.getConnection();
Ticket ticket = conn.getObject(prefixTicketId(ticketId));
conn.delete(prefixTicketId(ticketId));
conn.close();
return ticket;
}
use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisTicketServices method get.
@Override
public Ticket get(String ticketId) {
RedisConnection conn = connectionFactory.getConnection();
Ticket ticket = conn.getObject(prefixTicketId(ticketId));
conn.close();
return ticket;
}
use of org.maxkey.persistence.redis.RedisConnection in project MaxKey by dromara.
the class RedisTicketGrantingTicketServices 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 RedisTicketGrantingTicketServices method store.
@Override
public void store(String ticketId, Ticket ticket, int validitySeconds) {
RedisConnection conn = connectionFactory.getConnection();
conn.setexObject(PREFIX + ticketId, validitySeconds, ticket);
conn.close();
}
Aggregations