@Service(value=SessionUtilities.class) public class SessionUtilities extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
minSessionKeepAliveMillis
minimum keep alive interval in milliseconds.
|
| Constructor and Description |
|---|
SessionUtilities()
Creates a utility instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
determineClassId(Class<?> clazz)
Determines the classid from the @ClassId annotation.
|
String |
determineTablename(Class<?> clazz)
Determines the tablename from the @TableName annotation.
|
int |
getClassId(String pdoClassName)
Gets the classid of a pdo class.
|
String |
getClassName(int classId)
Gets the classname for a classid.
|
String |
getClassName(String tableName)
Gets the classname for tablename.
|
Collection<String> |
getClassNames()
Gets a list of all class names.
Sorted by name. |
static SessionUtilities |
getInstance()
The singleton.
|
String |
getTableName(String className)
Gets the tablename of a pdo class.
|
boolean |
isSomeRemoved(long lastSerial,
List<IdSerialTuple> expireSet,
long maxSerial)
Inspects an expiration set and determines whether at least one object has been removed.
|
void |
keepAliveIntervalChanged(Session session)
Handles the change of a keep alive interval of a session.
|
void |
startKeepAliveDaemonIfNotRunning()
Starts the keep alive thread if not already running.
|
void |
terminateHelperThreads()
Stops all helper threads.
|
public static long minSessionKeepAliveMillis
public static SessionUtilities getInstance()
public String getTableName(String className)
className - the classname of the objectpublic String getClassName(String tableName)
tableName - the tablenamepublic int getClassId(String pdoClassName)
pdoClassName - the classname of the pdopublic String getClassName(int classId)
classId - the classidpublic Collection<String> getClassNames()
public String determineTablename(Class<?> clazz)
clazz - the classpublic int determineClassId(Class<?> clazz)
clazz - the classpublic void startKeepAliveDaemonIfNotRunning()
public void terminateHelperThreads()
public void keepAliveIntervalChanged(Session session)
session - the sessionpublic boolean isSomeRemoved(long lastSerial,
List<IdSerialTuple> expireSet,
long maxSerial)
lastSerial - the last known tableserial, ≤0 if unknownexpireSet - the expiration setmaxSerial - the current tableserialTentackle - distributed, domain- and model-driven