|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--zeta.util.CachedQueries
Cache for some frequently used queries.
| Field Summary | |
private static long |
lastMaxDays
|
private static java.lang.String |
lastMaxDaysUpdate
|
private static long |
lastTeamNamesRefresh
|
private static long |
lastUserDataTableRefresh
|
private static long |
lastUserNamesRefresh
|
private static int |
lastUsersForRecomputationServerId
|
private static java.lang.String |
lastUsersForRecomputationUpdate
|
private static int |
numberOfComputers
|
private static java.util.Map |
teamNames
|
private static Table |
userDataTable
Contains the data about the top producers. |
private static java.util.Map |
userMinStartDays
|
private static java.util.Map |
userNames
|
private static java.lang.String |
usersForRecomputation
|
private static Table |
workstationTable
|
| Constructor Summary | |
CachedQueries()
|
|
| Method Summary | |
static int |
getMaxComputersUsed(java.lang.String name)
Returns the maximum number of computers which are used by the specified user name simultaneously. |
static long |
getMaxDays(java.sql.Statement stmt)
Returns the latest days of the result table. |
static int |
getNumberOfComputers()
Returns the current number of computers. |
static java.util.Map |
getTeamNames(java.sql.Connection con)
Maps all defined team names in lower case to the first typed team name. |
static Table |
getUserData(java.sql.Connection con)
Returns the data about the top producers. |
static java.lang.Object[] |
getUserData(java.lang.String name,
java.lang.String teamname)
Returns an array of objects: 1. |
static java.lang.Long |
getUserMinStartDays(java.sql.Connection con,
java.lang.String userName)
Returns the starting timestamp in DAYS of the specified user name. |
static java.util.Map |
getUserNames(java.sql.Connection con)
Maps all defined user names in lower case to the first typed user name. |
static java.lang.String |
getUsersForRecomputation(java.sql.Statement stmt,
int serverId)
Returns a list of user ID for the specified server ID that can be used for recomputation of work units. |
static Table |
getWorkstationTable()
Returns the data about the workstations. |
static void |
setNumberOfComputers(int numberOfComputers)
Defines the current number of computers. |
static void |
setWorkstationTable(Table table)
Set the data about the workstations. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static Table workstationTable
private static Table userDataTable
private static long lastUserDataTableRefresh
private static long lastUserNamesRefresh
private static java.util.Map userNames
private static java.util.Map userMinStartDays
private static long lastTeamNamesRefresh
private static java.util.Map teamNames
private static long lastMaxDays
private static java.lang.String lastMaxDaysUpdate
private static java.lang.String usersForRecomputation
private static java.lang.String lastUsersForRecomputationUpdate
private static int lastUsersForRecomputationServerId
private static int numberOfComputers
| Constructor Detail |
public CachedQueries()
| Method Detail |
public static java.util.Map getUserNames(java.sql.Connection con)
throws java.sql.SQLException
con - connection to the back-end database
java.sql.SQLException
public static java.lang.Long getUserMinStartDays(java.sql.Connection con,
java.lang.String userName)
throws java.sql.SQLException
con - connection to the back-end databaseuserName - user name
java.sql.SQLException
public static java.util.Map getTeamNames(java.sql.Connection con)
throws java.sql.SQLException
con - connection to the back-end database
java.sql.SQLException
public static long getMaxDays(java.sql.Statement stmt)
throws java.sql.SQLException
stmt - statement object's database
java.sql.SQLException
public static java.lang.String getUsersForRecomputation(java.sql.Statement stmt,
int serverId)
throws java.sql.SQLException
stmt - statement object's databaseserverId - server ID
java.sql.SQLException
public static Table getUserData(java.sql.Connection con)
throws java.sql.SQLException
con - connection to the back-end database
java.sql.SQLExceptionpublic static void setWorkstationTable(Table table)
table - the data about the workstations.public static Table getWorkstationTable()
public static java.lang.Object[] getUserData(java.lang.String name,
java.lang.String teamname)
name - user name in lower caseteamname - only users that are members of the specified team name (trim and in lower case) are considered if teamname is not null
public static int getMaxComputersUsed(java.lang.String name)
name - user name
public static void setNumberOfComputers(int numberOfComputers)
numberOfComputers - number of computerspublic static int getNumberOfComputers()
|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||