|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.ranking.GetDAX
public class GetDAX
This class is responsible for the fetching the DAX'es on the basis of the request ID's from the Windward Provenance Tracking Catalog. If there are more than one way's to get the DAX's then it should be an interface.
| Field Summary | |
|---|---|
static String |
c_prefix
Prefix for the property subset to use with this catalog. |
static String |
DB_PREFIX
The DB Driver properties prefix. |
private Connection |
mConnection
Maintains the connection to the database over the lifetime of this instance. |
private static String[] |
mCStatements
The statement to prepare to slurp attributes. |
private LogManager |
mLogger
The instance to the Logging manager. |
private Properties |
mProps
The properties passed to the client. |
private PreparedStatement[] |
mStatements
Maintains an essential set of prepared statement, ready to use. |
| Constructor Summary | |
|---|---|
GetDAX()
The default constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Explicitely free resources before the garbage collection hits. |
boolean |
connect(PegasusProperties properties)
A convenience method to connect on the basis of PegasusProperties. |
boolean |
connect(Properties props)
Establishes a connection to the database from the properties. |
Collection<String> |
get(String id,
String dir)
Given a request ID it fetches the DAX's from the DB and writes out to the directory passed. |
protected String |
getJDBCURL(String driver,
Properties properties)
Constructs the jdbc url on the basis fo the driver and db properties. |
protected PreparedStatement |
getStatement(int i)
Singleton manager for prepared statements. |
boolean |
isClosed()
Predicate to check, if the connection with the catalog's implementation is still active. |
static void |
main(String[] args)
For Testing purposes only. |
protected static void |
sanityCheck(File dir)
Checks the destination location for existence, if it can be created, if it is writable etc. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String c_prefix
public static final String DB_PREFIX
private static final String[] mCStatements
private Connection mConnection
private PreparedStatement[] mStatements
private Properties mProps
private LogManager mLogger
| Constructor Detail |
|---|
public GetDAX()
| Method Detail |
|---|
public boolean connect(PegasusProperties properties)
properties - PegasusProperties
public boolean connect(Properties props)
props - is the property table with sufficient settings to
establish a link with the database. The minimum key required key is
"url", and possibly "driver". Any other keys depend on the database
driver.
DriverManager.getConnection( String, Properties )
protected String getJDBCURL(String driver,
Properties properties)
driver - the driver being used.properties - the db properites
public Collection<String> get(String id,
String dir)
id - the request id.dir - the directory where the DAX'es need to be placed.
public boolean isClosed()
close().
close()public void close()
protected PreparedStatement getStatement(int i)
throws SQLException
i - is the index which prepared statement to check.
SQLException - in case of unable to delete entry.
protected static void sanityCheck(File dir)
throws IOException
dir - is the new base directory to optionally create.
IOException - in case of error while writing out files.public static void main(String[] args)
args - the arguments passed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||