package org.realityforge.ssf;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class SimpleSessionInfo
  implements SessionInfo, Serializable
{
  private final String _sessionID;
  private long _createdAt;
  private long _lastAccessedAt;
  private Map<String, Serializable> _attributes = new HashMap<>();

  public SimpleSessionInfo( @Nonnull final String sessionID )
  {
    _sessionID = sessionID;
    _createdAt = _lastAccessedAt = System.currentTimeMillis();
  }

  @Nonnull
  @Override
  public Set<String> getAttributeKeys()
  {
    return _attributes.keySet();
  }

  @Nonnull
  public String getSessionID()
  {
    return _sessionID;
  }

  @Nullable
  @Override
  public Serializable getAttribute( @Nonnull final String key )
  {
    return _attributes.get( key );
  }

  @Override
  public void setAttribute( @Nonnull final String key, @Nonnull final Serializable value )
  {
    _attributes.put( key, value );
  }

  @Override
  public void removeAttribute( @Nonnull final String key )
  {
    _attributes.remove( key );
  }

  public long getCreatedAt()
  {
    return _createdAt;
  }

  public long getLastAccessedAt()
  {
    return _lastAccessedAt;
  }

  public void updateAccessTime()
  {
    _lastAccessedAt = System.currentTimeMillis();
  }
}

@@ -694,24 +694,67 @@
 %0A  %7D%0A%0A  
-@Nonnull
+/**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Nonnull%0A  @Override
 %0A  publi
@@ -805,24 +805,55 @@
 ionID;%0A  %7D%0A%0A
+  /**%0A   * %7B@inheritDoc%7D%0A   */%0A
   @Nullable%0A
@@ -964,32 +964,63 @@
 et( key );%0A  %7D%0A%0A
+  /**%0A   * %7B@inheritDoc%7D%0A   */%0A
   @Override%0A  pu
@@ -1150,16 +1150,47 @@
 );%0A  %7D%0A%0A
+  /**%0A   * %7B@inheritDoc%7D%0A   */%0A
   @Overr
@@ -1288,24 +1288,67 @@
 key );%0A  %7D%0A%0A
+  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Override%0A
   public lon
@@ -1388,32 +1388,75 @@
 createdAt;%0A  %7D%0A%0A
+  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Override%0A
   public long ge
@@ -1510,16 +1510,59 @@
 t;%0A  %7D%0A%0A
+  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Override%0A
   public

Mark methods as overridden