com.webtair.session.config
Class ConfigBean

java.lang.Object
  extended by com.webtair.session.config.ConfigBean

public class ConfigBean
extends java.lang.Object

Config Bean – implements basic configuration information needed for properly working SessionMan.

Author:
Vyacheslav Yakovenko (Vaclav)

Field Summary
protected static long DEFAULT_CLEANUP_INTERVAL
          Default session cleanus interval 10min
protected static long DEFAULT_SESSION_LIFETIME
          Default session life in ms = 30min * 60s * 1000ms
protected static int DEFAULT_USER_COUNT
          Prospective quantity of sessions
protected static int MIN_CLEANUP_INTERVAL
          Minimally admissible cleanup interval
protected static int MIN_SESSION_LIFETIME
          Minimally admissible time of a session life
 
Constructor Summary
ConfigBean()
          Default constructor init all fields of bean with values defined in constants
ConfigBean(int userCount, long sessionLifeTime, long cleanupInterval)
          Constructor that specifies all fields of the bean
ConfigBean(long sessionLifeTime, long cleanupInterval)
          Constructor that specifies only session life time and cleanup interval.
 
Method Summary
 long getCleanupInterval()
          Return current cleanup interval in ms;
 long getSessionLifeTime()
          Return current session lifetime in ms
 int getUserCount()
          Return current user count (initial size of HashMap)
 void setCleanupInterval(long cleanupInterval)
          Set current cleanup interval in ms;
 void setSessionLifeTime(long sessionLifeTime)
          Set session lifetime in ms;
 void setUserCount(int userCount)
          Set current user count (initial size of HashMap)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_SESSION_LIFETIME

protected static final int MIN_SESSION_LIFETIME
Minimally admissible time of a session life

See Also:
Constant Field Values

MIN_CLEANUP_INTERVAL

protected static final int MIN_CLEANUP_INTERVAL
Minimally admissible cleanup interval

See Also:
Constant Field Values

DEFAULT_USER_COUNT

protected static final int DEFAULT_USER_COUNT
Prospective quantity of sessions

See Also:
Constant Field Values

DEFAULT_SESSION_LIFETIME

protected static final long DEFAULT_SESSION_LIFETIME
Default session life in ms = 30min * 60s * 1000ms

See Also:
Constant Field Values

DEFAULT_CLEANUP_INTERVAL

protected static final long DEFAULT_CLEANUP_INTERVAL
Default session cleanus interval 10min

See Also:
Constant Field Values
Constructor Detail

ConfigBean

public ConfigBean()
Default constructor init all fields of bean with values defined in constants


ConfigBean

public ConfigBean(long sessionLifeTime,
                  long cleanupInterval)
Constructor that specifies only session life time and cleanup interval.

Parameters:
sessionLifeTime - - session life time in ms;
cleanupInterval - - cleanup interval in ms;

ConfigBean

public ConfigBean(int userCount,
                  long sessionLifeTime,
                  long cleanupInterval)
Constructor that specifies all fields of the bean

Parameters:
userCount - - predicted value of users for HashMap init
sessionLifeTime - - session life time in ms;
cleanupInterval - - cleanup interval in ms;
Method Detail

getCleanupInterval

public long getCleanupInterval()
Return current cleanup interval in ms;

Returns:
the cleanupInterval;

setCleanupInterval

public void setCleanupInterval(long cleanupInterval)
Set current cleanup interval in ms;

Parameters:
cleanupInterval - the cleanup interval in ms;

getSessionLifeTime

public long getSessionLifeTime()
Return current session lifetime in ms

Returns:
the sessionLifeTime in ms

setSessionLifeTime

public void setSessionLifeTime(long sessionLifeTime)
Set session lifetime in ms;

Parameters:
sessionLifeTime - the session lifetime in ms;

getUserCount

public int getUserCount()
Return current user count (initial size of HashMap)

Returns:
userCount - initial user count

setUserCount

public void setUserCount(int userCount)
Set current user count (initial size of HashMap)

Parameters:
userCount - the userCount to set


Copyright © 2006 webtair.com . All Rights Reserved.