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
IOException
public void submitJob(Jobs.JobDBEntry j, WorkflowContext context) throws IOException
submitJob
in interface DBConnector
IOException
public void updateJob(Jobs.JobDBEntry j) throws IOException
updateJob
in interface DBConnector
IOException
public Workflows fetchWorkflows() throws IOException
fetchWorkflows
in interface DBConnector
IOException
public Workflows fetchWorkflows(Workflows.WorkflowDBEntry.WorkflowFields field, boolean sortAscending, int offset, int limit) throws IOException
fetchWorkflows
in interface DBConnector
IOException
public 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 DBConnector
IOException
public List<Jobs.JobDBEntry> fetchJobDetails(String workflowId) throws IOException
fetchJobDetails
in interface DBConnector
IOException
public List<Jobs.JobDBEntry> fetchJobDetails(long minFinishTime, long maxStartTime) throws IOException
fetchJobDetails
in interface DBConnector
IOException
public long[] fetchJobStartStopTimes(String jobID) throws IOException
fetchJobStartStopTimes
in interface DBConnector
IOException
public List<TaskAttempt> fetchTaskAttempts(long minFinishTime, long maxStartTime) throws IOException
fetchTaskAttempts
in interface DBConnector
IOException
public List<TaskAttempt> fetchJobTaskAttempts(String jobID) throws IOException
fetchJobTaskAttempts
in interface DBConnector
IOException
public List<TaskAttempt> fetchWorkflowTaskAttempts(String workflowId) throws IOException
fetchWorkflowTaskAttempts
in interface DBConnector
IOException
protected PreparedStatement getQualifiedPS(PostgresConnector.Statements statement, String searchClause) throws IOException
IOException
protected PreparedStatement getQualifiedPS(PostgresConnector.Statements statement, String searchClause, Workflows.WorkflowDBEntry.WorkflowFields field, boolean sortAscending, int offset, int limit) throws IOException
IOException
public void close()
close
in interface DBConnector
Copyright © 2015. All rights reserved.