Map<String, PersistentSession> ret = new HashMap<String, PersistentSession>();
for (Map.Entry<String, SessionEntry> sessionEntry : data.entrySet()) {
if (sessionEntry.getValue().expiry.getTime() > time) {
Map<String, Object> session = new HashMap<String, Object>();
for (Map.Entry<String, byte[]> sessionAttribute : sessionEntry.getValue().data.entrySet()) {
unmarshaller.start(new ByteBufferInput(ByteBuffer.wrap(sessionAttribute.getValue())));
session.put(sessionAttribute.getKey(), unmarshaller.readObject());
unmarshaller.finish();
}
ret.put(sessionEntry.getKey(), new PersistentSession(sessionEntry.getValue().expiry, session));
}