|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.platform.service.controller.AbstractService
com.metamatrix.server.query.service.QueryService
public class QueryService
Wraps up a QueryServiceEngine to tie it into the platform concept of services. Is a remote object. Provides the QueryServiceEngine with a session service object. Configures the QueryServiceEngine from the configuration source. Buffers the QueryServiceEngine from dependencies on CurrentConfiguration.getInstance(). These measures allow the QueryServiceEngine to be instantiated in a light-weight fashion without a full, running "server".
| Field Summary |
|---|
| Fields inherited from interface com.metamatrix.server.query.service.QueryServiceInterface |
|---|
SERVICE_NAME |
| Fields inherited from interface com.metamatrix.platform.service.api.ServiceInterface |
|---|
WAIT_TO_DIE_TIME |
| Fields inherited from interface com.metamatrix.platform.service.api.CacheAdmin |
|---|
CODE_TABLE_CACHE, CONNECTOR_RESULT_SET_CACHE, PREPARED_PLAN_CACHE, QUERY_SERVICE_RESULT_SET_CACHE |
| Constructor Summary | |
|---|---|
QueryService()
|
|
| Method Summary | |
|---|---|
void |
cancelQueries(SessionToken sessionToken,
boolean shouldRollback)
|
void |
cancelQuery(AtomicRequestID ari)
|
void |
cancelQuery(RequestID requestID,
boolean shouldRollback)
|
void |
clearCache(SessionToken sessionToken)
|
void |
clearCache(java.lang.String name,
java.util.Properties props)
Clear the named cached using properties to set options if necessary |
protected void |
closeService()
Close the service to new work if applicable. |
java.util.Collection |
getAllQueries()
|
java.util.Map |
getCaches()
Get names of all caches in this object |
java.util.Collection |
getQueriesForSession(SessionToken userToken)
|
java.util.Collection |
getQueueStatistics()
Returns a list of QueueStats objects that represent the queues in this service. |
WorkerPoolStats |
getQueueStatistics(java.lang.String name)
Returns a QueueStats object that represent the queue in this service. |
java.util.Collection<Transaction> |
getTransactions()
|
protected TransactionService |
getTransactionService()
|
void |
init(ServiceID id,
DeployedComponentID deployedComponentID,
java.util.Properties props,
ClientServiceRegistry listenerRegistry,
ClassLoaderManager clManager)
Initialize a service using the properties specified. |
protected void |
initService(java.util.Properties props)
Perform initialization and commence processing. |
protected void |
killService()
Terminate all processing and reclaim resources. |
void |
terminateTransaction(java.lang.String transactionId,
java.lang.String sessionId)
|
void |
terminateTransaction(javax.transaction.xa.Xid transactionId)
|
protected void |
waitForServiceToClear()
Wait until the service has completed all outstanding work. |
| Methods inherited from class com.metamatrix.platform.service.controller.AbstractService |
|---|
checkState, die, dieNow, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getInstanceName, getProcessName, getProperties, getResourceName, getServiceData, getServiceName, getServiceType, getStartTime, getStateChangeTime, isAlive, isClosed, isInitialized, isOpen, processEvent, registerForEvents, setInitException, unregisterForEvents, updateState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.metamatrix.platform.service.api.ServiceInterface |
|---|
checkState, die, dieNow, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getProcessName, getProperties, getServiceData, getServiceType, getStartTime, getStateChangeTime, isAlive, setInitException, updateState |
| Constructor Detail |
|---|
public QueryService()
| Method Detail |
|---|
protected void initService(java.util.Properties props)
throws java.lang.Exception
AbstractService
initService in class AbstractServicejava.lang.Exception
protected void closeService()
throws java.lang.Exception
AbstractService
closeService in class AbstractServicejava.lang.Exception
protected void waitForServiceToClear()
throws java.lang.Exception
AbstractService
waitForServiceToClear in class AbstractServicejava.lang.Exceptionprotected void killService()
AbstractService
killService in class AbstractService
public void clearCache(SessionToken sessionToken)
throws ComponentNotFoundException
clearCache in interface QueryServiceInterfaceComponentNotFoundExceptionpublic java.util.Collection getAllQueries()
getAllQueries in interface QueryServiceInterface
public void cancelQueries(SessionToken sessionToken,
boolean shouldRollback)
throws MetaMatrixComponentException
cancelQueries in interface QueryServiceInterfaceMetaMatrixComponentExceptionpublic java.util.Collection getQueriesForSession(SessionToken userToken)
public void cancelQuery(RequestID requestID,
boolean shouldRollback)
throws InvalidRequestIDException,
MetaMatrixComponentException
cancelQuery in interface QueryServiceInterfaceInvalidRequestIDException
MetaMatrixComponentException
public void cancelQuery(AtomicRequestID ari)
throws InvalidRequestIDException,
MetaMatrixComponentException
cancelQuery in interface QueryServiceInterfaceInvalidRequestIDException
MetaMatrixComponentExceptionpublic java.util.Collection getQueueStatistics()
getQueueStatistics in interface ServiceInterfacegetQueueStatistics in class AbstractServicepublic WorkerPoolStats getQueueStatistics(java.lang.String name)
getQueueStatistics in interface ServiceInterfacegetQueueStatistics in class AbstractService
public java.util.Map getCaches()
throws MetaMatrixComponentException
CacheAdmin
getCaches in interface CacheAdminMetaMatrixComponentException - If an error occurs
public void clearCache(java.lang.String name,
java.util.Properties props)
throws MetaMatrixComponentException
CacheAdmin
clearCache in interface CacheAdminname - Name of the cache to clearprops - Optional additional properties which may vary by cache type
MetaMatrixComponentException - If an error occurs
public void init(ServiceID id,
DeployedComponentID deployedComponentID,
java.util.Properties props,
ClientServiceRegistry listenerRegistry,
ClassLoaderManager clManager)
AbstractService
init in interface ServiceInterfaceinit in class AbstractServiceid - The ServiceID this service was registered withdeployedComponentID - Unique identifier of this deployed component.props - the properties which define the service configurationpublic java.util.Collection<Transaction> getTransactions()
getTransactions in interface QueryServiceInterface
public void terminateTransaction(java.lang.String transactionId,
java.lang.String sessionId)
throws AdminException
terminateTransaction in interface QueryServiceInterfaceAdminException
public void terminateTransaction(javax.transaction.xa.Xid transactionId)
throws AdminException
terminateTransaction in interface QueryServiceInterfaceAdminExceptionprotected TransactionService getTransactionService()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||