|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--zeta.util.Parameter
Gets global parameters from the database.
| Field Summary | |
static int |
GLOBAL_PARAMETER
|
private static java.util.Map |
mapValue
Cache for parameters. |
private static long[] |
serverMaxWorkUnitId
Values which are returned from the method getServerMaxWorkUnitId. |
private static java.lang.Boolean |
updateServerMaxWorkUnitId
true if the attribute serverMaxWorkUnitId has to retrieve from the database. |
| Constructor Summary | |
Parameter()
|
|
| Method Summary | |
static long[] |
getServerMaxWorkUnitId(ZetaServlet servlet,
java.sql.Statement stmt,
int serverId,
int taskId)
Returns the maximal possible work unit ID ( result[0]+result[1] = work_unit_id+range) for the specified server. |
static long |
getValue(java.sql.Statement stmt,
java.lang.String parameter,
int taskId,
long defaultValue,
long cachingTime)
Returns the value of the specified task parameter. |
static java.lang.String |
getValue(java.sql.Statement stmt,
java.lang.String parameter,
int taskId,
java.lang.String defaultValue)
Returns the value of the specified task parameter. |
static java.lang.String |
getValue(java.sql.Statement stmt,
java.lang.String parameter,
int taskId,
java.lang.String defaultValue,
long cachingTime)
Returns the value of the specified task parameter. |
static java.lang.String |
getValue(java.sql.Statement stmt,
java.lang.String parameter,
java.lang.String defaultValue)
Returns the value of the specified global parameter. |
static long |
newServerMaxWorkUnitId(ZetaServlet servlet,
java.sql.Statement stmt,
int serverId,
int taskId)
Inserts a new reservation of work units in the database for the specified server. |
static void |
setValue(int serverId,
java.sql.Statement stmt,
int taskId,
java.lang.String parameter,
java.lang.String value,
boolean synchronizeWithOtherServers)
Set the value of the specified global parameter. |
static void |
setValue(java.sql.Statement stmt,
int taskId,
java.lang.String parameter,
java.lang.String value)
Set the value of the specified task parameter. |
static void |
setValue(java.sql.Statement stmt,
java.lang.String parameter,
java.lang.String value)
Set the value of the specified global parameter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int GLOBAL_PARAMETER
private static java.util.Map mapValue
private static java.lang.Boolean updateServerMaxWorkUnitId
true if the attribute serverMaxWorkUnitId has to retrieve from the database.
private static long[] serverMaxWorkUnitId
getServerMaxWorkUnitId.
| Constructor Detail |
public Parameter()
| Method Detail |
public static java.lang.String getValue(java.sql.Statement stmt,
java.lang.String parameter,
java.lang.String defaultValue)
throws java.sql.SQLException
stmt - statement object's databaseparameter - global parameterdefaultValue - default value
java.sql.SQLException - if a database access error occurs.
public static java.lang.String getValue(java.sql.Statement stmt,
java.lang.String parameter,
int taskId,
java.lang.String defaultValue)
throws java.sql.SQLException
stmt - statement object's databaseparameter - global parametertaskId - ID of the taskdefaultValue - default value
java.sql.SQLException - if a database access error occurs.
public static long getValue(java.sql.Statement stmt,
java.lang.String parameter,
int taskId,
long defaultValue,
long cachingTime)
throws java.sql.SQLException
stmt - statement object's databaseparameter - global parametertaskId - ID of the taskdefaultValue - default valuecachingTime - caching the value for milli seconds
java.sql.SQLException - if a database access error occurs.
public static java.lang.String getValue(java.sql.Statement stmt,
java.lang.String parameter,
int taskId,
java.lang.String defaultValue,
long cachingTime)
throws java.sql.SQLException
stmt - statement object's databaseparameter - task parametertaskId - ID of the taskdefaultValue - default valuecachingTime - caching the value for milli seconds
java.sql.SQLException - if a database access error occurs.
public static void setValue(java.sql.Statement stmt,
java.lang.String parameter,
java.lang.String value)
throws java.sql.SQLException
stmt - statement object's databaseparameter - global parametervalue - value of the parameter
java.sql.SQLException - if a database access error occurs.
public static void setValue(java.sql.Statement stmt,
int taskId,
java.lang.String parameter,
java.lang.String value)
throws java.sql.SQLException
stmt - statement object's databasetaskId - ID of the taskparameter - task parametervalue - value of the parameter
java.sql.SQLException - if a database access error occurs.
public static void setValue(int serverId,
java.sql.Statement stmt,
int taskId,
java.lang.String parameter,
java.lang.String value,
boolean synchronizeWithOtherServers)
throws java.sql.SQLException
serverId - ID of the servertaskId - ID of the taskstmt - statement object's databaseparameter - global parametervalue - value of the parametersynchronizeWithOtherServers - the parameter will be synchronized with other servers.
java.sql.SQLException - if a database access error occurs.
public static long[] getServerMaxWorkUnitId(ZetaServlet servlet,
java.sql.Statement stmt,
int serverId,
int taskId)
throws java.sql.SQLException,
javax.servlet.ServletException
result[0]+result[1] = work_unit_id+range) for the specified server.
servlet - servlet which has a connection to the server database.stmt - statement object's databaseserverId - ID of the servertaskId - ID of the task
result[0]+result[1] = work_unit_id+range) for the specified server.
java.sql.SQLException - if a database access error occurs.
javax.servlet.ServletException
public static long newServerMaxWorkUnitId(ZetaServlet servlet,
java.sql.Statement stmt,
int serverId,
int taskId)
throws java.sql.SQLException,
javax.servlet.ServletException
servlet - servlet which has a connection to the server database.stmt - statement object's databaseserverId - ID of the servertaskId - ID of the task
java.sql.SQLException - if a database access error occurs or the table 'zeta.server' is not defined.
javax.servlet.ServletException
|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||