public class PostgresConnector extends Object implements DBConnector
| Modifier and Type | Class and Description |
|---|---|
static class |
PostgresConnector.Statements |
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
db |
protected static int |
DEFAULT_LIMIT |
static String |
SORT_ASC |
static String |
SORT_DESC |
| Constructor and Description |
|---|
PostgresConnector(String connectionURL,
String driverName,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
List<Jobs.JobDBEntry> |
fetchJobDetails(long minFinishTime,
long maxStartTime) |
List<Jobs.JobDBEntry> |
fetchJobDetails(String workflowId) |
long[] |
fetchJobStartStopTimes(String jobID) |
List<TaskAttempt> |
fetchJobTaskAttempts(String jobID) |
List<TaskAttempt> |
fetchTaskAttempts(long minFinishTime,
long maxStartTime) |
Workflows |
fetchWorkflows() |
DataTable |
fetchWorkflows(int offset,
int limit,
String searchTerm,
int echo,
Workflows.WorkflowDBEntry.WorkflowFields col,
boolean sortAscending,
String searchWorkflowId,
String searchWorkflowName,
String searchWorkflowType,
String searchUserName,
int minJobs,
int maxJobs,
long minInputBytes,
long maxInputBytes,
long minOutputBytes,
long maxOutputBytes,
long minDuration,
long maxDuration,
long minStartTime,
long maxStartTime,
long minFinishTime,
long maxFinishTime) |
Workflows |
fetchWorkflows(Workflows.WorkflowDBEntry.WorkflowFields field,
boolean sortAscending,
int offset,
int limit) |
List<TaskAttempt> |
fetchWorkflowTaskAttempts(String workflowId) |
protected void |
finalize() |
protected PreparedStatement |
getQualifiedPS(PostgresConnector.Statements statement,
String searchClause) |
protected PreparedStatement |
getQualifiedPS(PostgresConnector.Statements statement,
String searchClause,
Workflows.WorkflowDBEntry.WorkflowFields field,
boolean sortAscending,
int offset,
int limit) |
void |
submitJob(Jobs.JobDBEntry j,
WorkflowContext context) |
void |
updateJob(Jobs.JobDBEntry j) |
public static final String SORT_ASC
public static final String SORT_DESC
protected static final int DEFAULT_LIMIT
protected Connection db
public PostgresConnector(String connectionURL, String driverName, String username, String password) throws IOException
IOExceptionpublic void submitJob(Jobs.JobDBEntry j, WorkflowContext context) throws IOException
submitJob in interface DBConnectorIOExceptionpublic void updateJob(Jobs.JobDBEntry j) throws IOException
updateJob in interface DBConnectorIOExceptionpublic Workflows fetchWorkflows() throws IOException
fetchWorkflows in interface DBConnectorIOExceptionpublic Workflows fetchWorkflows(Workflows.WorkflowDBEntry.WorkflowFields field, boolean sortAscending, int offset, int limit) throws IOException
fetchWorkflows in interface DBConnectorIOExceptionpublic DataTable fetchWorkflows(int offset, int limit, String searchTerm, int echo, Workflows.WorkflowDBEntry.WorkflowFields col, boolean sortAscending, String searchWorkflowId, String searchWorkflowName, String searchWorkflowType, String searchUserName, int minJobs, int maxJobs, long minInputBytes, long maxInputBytes, long minOutputBytes, long maxOutputBytes, long minDuration, long maxDuration, long minStartTime, long maxStartTime, long minFinishTime, long maxFinishTime) throws IOException
fetchWorkflows in interface DBConnectorIOExceptionpublic List<Jobs.JobDBEntry> fetchJobDetails(String workflowId) throws IOException
fetchJobDetails in interface DBConnectorIOExceptionpublic List<Jobs.JobDBEntry> fetchJobDetails(long minFinishTime, long maxStartTime) throws IOException
fetchJobDetails in interface DBConnectorIOExceptionpublic long[] fetchJobStartStopTimes(String jobID) throws IOException
fetchJobStartStopTimes in interface DBConnectorIOExceptionpublic List<TaskAttempt> fetchTaskAttempts(long minFinishTime, long maxStartTime) throws IOException
fetchTaskAttempts in interface DBConnectorIOExceptionpublic List<TaskAttempt> fetchJobTaskAttempts(String jobID) throws IOException
fetchJobTaskAttempts in interface DBConnectorIOExceptionpublic List<TaskAttempt> fetchWorkflowTaskAttempts(String workflowId) throws IOException
fetchWorkflowTaskAttempts in interface DBConnectorIOExceptionprotected PreparedStatement getQualifiedPS(PostgresConnector.Statements statement, String searchClause) throws IOException
IOExceptionprotected PreparedStatement getQualifiedPS(PostgresConnector.Statements statement, String searchClause, Workflows.WorkflowDBEntry.WorkflowFields field, boolean sortAscending, int offset, int limit) throws IOException
IOExceptionpublic void close()
close in interface DBConnectorCopyright © 2016. All rights reserved.