org.rhq.plugins.postgres
Class PostgresTableComponent

java.lang.Object
  extended by org.rhq.plugins.postgres.PostgresTableComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, DeleteResourceFacet, ResourceComponent<PostgresDatabaseComponent>, MeasurementFacet, DatabaseComponent<PostgresDatabaseComponent>

public class PostgresTableComponent
extends java.lang.Object
implements DatabaseComponent<PostgresDatabaseComponent>, MeasurementFacet, ConfigurationFacet, DeleteResourceFacet

Represents a postgres table

Author:
Greg Hinkle

Field Summary
static java.lang.String PG_COUNT_ROWS
           
static java.lang.String PG_COUNT_ROWS_APPROX
           
static java.lang.String PG_STAT_USER_TABLES_QUERY
           
 
Constructor Summary
PostgresTableComponent()
           
 
Method Summary
 void deleteResource()
           
 AvailabilityType getAvailability()
           
 java.sql.Connection getConnection()
           
 java.lang.String getTableName()
           
 void getValues(MeasurementReport report, java.util.Set<MeasurementScheduleRequest> requests)
           
 Configuration loadResourceConfiguration()
           
 void removeConnection()
           
 void start(ResourceContext<PostgresDatabaseComponent> context)
           
 void stop()
           
 void updateResourceConfiguration(ConfigurationUpdateReport report)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PG_STAT_USER_TABLES_QUERY

public static final java.lang.String PG_STAT_USER_TABLES_QUERY
See Also:
Constant Field Values

PG_COUNT_ROWS

public static final java.lang.String PG_COUNT_ROWS
See Also:
Constant Field Values

PG_COUNT_ROWS_APPROX

public static final java.lang.String PG_COUNT_ROWS_APPROX
See Also:
Constant Field Values
Constructor Detail

PostgresTableComponent

public PostgresTableComponent()
Method Detail

start

public void start(ResourceContext<PostgresDatabaseComponent> context)
Specified by:
start in interface ResourceComponent<PostgresDatabaseComponent>

stop

public void stop()
Specified by:
stop in interface ResourceComponent<PostgresDatabaseComponent>

getTableName

public java.lang.String getTableName()

getAvailability

public AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet

getValues

public void getValues(MeasurementReport report,
                      java.util.Set<MeasurementScheduleRequest> requests)
Specified by:
getValues in interface MeasurementFacet

deleteResource

public void deleteResource()
                    throws java.sql.SQLException
Specified by:
deleteResource in interface DeleteResourceFacet
Throws:
java.sql.SQLException

loadResourceConfiguration

public Configuration loadResourceConfiguration()
                                        throws java.lang.Exception
Specified by:
loadResourceConfiguration in interface ConfigurationFacet
Throws:
java.lang.Exception

updateResourceConfiguration

public void updateResourceConfiguration(ConfigurationUpdateReport report)
Specified by:
updateResourceConfiguration in interface ConfigurationFacet

getConnection

public java.sql.Connection getConnection()
Specified by:
getConnection in interface DatabaseComponent<PostgresDatabaseComponent>

removeConnection

public void removeConnection()
Specified by:
removeConnection in interface DatabaseComponent<PostgresDatabaseComponent>


Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.