/**
* Scans the session table for expired sessions and deletes them.
*/
private void reapExpiredSessions() {
ScanRequest request = new ScanRequest(tableName);
request.setSelect(Select.SPECIFIC_ATTRIBUTES);
request.withAttributesToGet(
SessionTableAttributes.SESSION_ID_KEY,
SessionTableAttributes.LAST_UPDATED_AT_ATTRIBUTE);
ScanResult scanResult = null;
do {
if (scanResult != null) request.setExclusiveStartKey(scanResult.getLastEvaluatedKey());
scanResult = dynamo.scan(request);
List<Map<String,AttributeValue>> items = scanResult.getItems();
for (Map<String, AttributeValue> item : items) {
if (isExpired(Long.parseLong(item.get(SessionTableAttributes.LAST_UPDATED_AT_ATTRIBUTE).getN()))) {