attributeNames = getAttributesNames();
}
Jedis jedis = pool.getResource();
try {
Transaction transaction = jedis.multi();
if (currentExpireAtTime < expireAtTime) {
transaction.set(expiresAtKey, Long.toString(expireAtTimeWithReserve));
transaction.expireAt(expiresAtKey, getUnixTime(expireAtTimeWithReserve));
transaction.expireAt(creationTimeKey, getUnixTime(expireAtTimeWithReserve));
transaction.expireAt(timeoutKey, getUnixTime(expireAtTimeWithReserve));
if (attributeNames != null && !attributeNames.isEmpty()) {
for (String attributeName : attributeNames) {
String key = RedisSessionKeys.getAttrKey(id, attributeName);
transaction.expireAt(key, getUnixTime(expireAtTimeWithReserve));
}
transaction.expireAt(attrsKey, getUnixTime(expireAtTimeWithReserve));
}
}
transaction.set(lastAccessTimeKey, Long.toString(currentTime));
transaction.expireAt(lastAccessTimeKey, getUnixTime(expireAtTime));
transaction.zadd(RedisSessionKeys.getSessionsKey(), currentTime, id);
transaction.exec();
pool.returnResource(jedis);
} catch (Throwable e) {
pool.returnBrokenResource(jedis);
throw new RuntimeException(e);