XML-RPCs Available to Project Components
server.getLastWorkUnit()
Description: Used by the work unit generator, this RPC returns information about the last work unit that was generated. This information is useful for determining where in the science data to resume partitioning after the work unit generator has been restarted. If no work units have ever been added to the project, this call throws an exception.
Parameters: 0
Throws Exception: If the project has zero work units.
Returns: vector
Vector Index | Type | Description |
0 | String | The work unit ID. |
1 | byte[] | The work unit data. |
2 | Date | The creation date of the work unit. |
3 | Integer | The point value of the work unit. |
4 | Integer | The priority of the work unit. |
server.getNumWorkUnits()
Description: Returns the number of ingress work units in the project database/transitioner.
Parameters: 0
Throws Exception: Never.
Returns: integer >= 0, the number of users waiting for work units.
server.addWorkUnit(String, byte[], int, int, double)
Description: Adds a work unit to the database/transitioner, and returns the number of clients that are blocked, waiting for a work unit.
Parameters: 5
Vector Index | Type | Description |
0 | String | The work unit ID to use. Must be unique. |
1 | byte[] | The work unit data. |
2 | Integer | The priority of this work unit, where priority >= 0. |
3 | Integer | The point value of this work unit, where points >= 0. |
4 | Double | The number of seconds until the work unit should expire, where seconds >= 0. |
Throws Exception: If the given work unit ID is already in use by another work unit or result.
Returns: integer >= 0, the number of users waiting for work units.
server.addWorkUnit(String, byte[], int, int)
Description: Adds a work unit to the database/transitioner, and returns the number of clients that are blocked, waiting for a work unit.
Parameters: 4
Vector Index | Type | Description |
0 | String | The work unit ID to use. Must be unique. |
1 | byte[] | The work unit data. |
2 | Integer | The priority of this work unit, where priority >= 0. |
3 | Integer | The point value of this work unit, where points >= 0. |
Throws Exception: If the given work unit ID is already in use by another work unit or result.
Returns: integer >= 0, the number of users waiting for work units.
server.addWorkUnit(byte[], int, int, double)
Description: Adds a work unit to the database/transitioner, and returns the number of clients that are blocked, waiting for a work unit.
Parameters: 4
Vector Index | Type | Description |
0 | byte[] | The work unit data. |
1 | Integer | The priority of this work unit, where priority >= 0. |
2 | Integer | The point value of this work unit, where points >= 0. |
3 | Double | The number of seconds until the work unit should expire, where seconds >= 0. |
Throws Exception: Never.
Returns: integer >= 0, the number of users waiting for work units.
server.addWorkUnit(byte[], int, int)
Description: Adds a work unit to the database/transitioner, and returns the number of clients that are blocked, waiting for a work unit.
Parameters: 3
Vector Index | Type | Description |
0 | byte[] | The work unit data. |
1 | Integer | The priority of this work unit, where priority >= 0. |
2 | Integer | The point value of this work unit, where points >= 0. |
Throws Exception: Never.
Returns: integer >= 0, the number of users waiting for work units.
server.addWorkUnit(byte[])
Description: Adds a work unit to the database/transitioner, and returns the number of clients that are blocked, waiting for a work unit.
Parameters: 1
Vector Index | Type | Description |
0 | byte[] | The work unit data. |
Throws Exception: Never.
Returns: integer >= 0, the number of users waiting for work units.
server.getResultForValidation()
Description: Gets the next result to be validated or a set of results for which a canonical result must be selected. This RPC is used by the validator.
Parameters: 0
Throws Exception: If there are no results to be validated.
Returns: vector (3 possibilities)
Return Type 0: Vector containing a single result to be validated.
Vector Index | Type | Description |
0 | Integer | Enumeration indicating the format of the rest of the vector. For Return Type 0 this value will always be 0. |
1 | String | The result ID. |
2 | byte[] | The result data. |
Return Type 1: Vector containing several results from which a canonical result must be selected.
Vector Index | Type | Description |
0 | Integer | Enumeration indicating the format of the rest of the vector. For Return Type 1 this value will always be 1. |
1 | Integer | The number of results in this vector, n. |
2 | String | The ID of result 0. |
3 | byte[] | The data from result 0. |
4 | String | The ID of result 1. |
5 | byte[] | The data from result 1. |
... | ... | ... |
2n + 1 | String | The ID of result n, where n = the value of vector index 1. |
2n + 2 | byte[] | The data from result n. |
Return Type 2: Vector containing a spot-check result to be validated.
Vector Index | Type | Description |
0 | Integer | Enumeration indicating the format of the rest of the vector. For Return Type 2 this value will always be 2. |
1 | String | The ID of the result returned by the client. |
2 | byte[] | The data from the result returned by the client. |
3 | byte[] | The data from the accepted spot-check result. |
server.getAssociatedWorkUnit(String)
Description: This is an optional RPC that can be used by the result validator. The server.getResultForValidation() RPC only returns the result data, so if the validator needs to examine the work unit data from which that result was computed, it can use the server.getAssociatedWorkUnit() RPC.
Parameters: 1
Vector Index | Type | Description |
0 | String | The ID of the result for which to find the associated work unit data. |
Throws Exception: If no result with the given ID was found.
Returns: vector.
Vector Index | Type | Description |
0 | byte[] | The work unit data associated with the given result. |
server.markResultValid(String)
Description: Marks a result as valid.
Parameters: 1
Vector Index | Type | Description |
0 | String | The ID of the result to mark valid. |
Throws Exception: Never.
Returns: boolean: true if the result was successfully marked valid, false if the given result ID was not found.
server.markResultInvalid(String)
Description: Marks a result as invalid.
Parameters: 1
Vector Index | Type | Description |
0 | String | The ID of the result to mark invalid. |
Throws Exception: Never.
Returns: boolean: true if the result was successfully marked invalid, false if the given result ID was not found.
server.selectCanonicalResult(String)
Description: Selects a result to be the canonical result for a work unit.
Parameters: 1
Vector Index | Type | Description |
0 | String | The ID of the canonical result. |
Throws Exception: Never.
Returns: boolean: true if the result was successfully selected to be the canonical result, false if the given result ID was not found.
server.getWorkUnitResultPairForAssimilation()
Description: Gets the next result to be assimilated and the work unit from which it was computed.
Parameters: 0
Throws Exception: If there are no results to be assimilated.
Returns: vector.
Vector Index | Type | Description |
0 | String | The ID of the work unit from which the result was computed. |
1 | byte[] | The work unit data. |
2 | String | The result ID. |
3 | byte[] | The result data. |
server.deleteValidResultAndAssociatedWorkUnit(String)
Description: Deletes the valid result with the given result ID and its associated work unit.
Parameters: 1
Vector Index | Type | Description |
0 | String | The ID of the result to delete. |
Throws Exception: If no valid result with the given result ID could be found.
Returns: boolean: true if the result and its associated work unit were successfully deleted, false if the result was deleted but no associated work unit could be found.
client.saveCheckpoint(byte[])
Description: Saves a work unit to disk for later retrieval using the client.getCheckpoint RPC. Only one check-point is saved, so subsequent executions of the RPC will overwrite the previous check-point.
Parameters: 1
Vector Index | Type | Description |
0 | byte[] | The check-point data. |
Throws Exception: Never.
Returns: boolean: true if the check-point was successfully saved to disk, false if any error occurred, such as insufficient permissions to create the file.
client.getCheckpoint()
Description: Saves a work unit to disk for later retrieval using the client.getCheckpoint RPC.
Parameters: 0
Throws Exception: Never.
Returns: vector.
Vector Index | Type | Description |
0 | byte[] | The last check-point data that was saved. If no check-point was found, the array will have length = 0. Otherwise, it will contain the saved check-point data. |
Prev | Home | Next |