|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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, 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, 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 AbstractService
java.lang.Exception
protected void closeService() throws java.lang.Exception
AbstractService
closeService
in class AbstractService
java.lang.Exception
protected void waitForServiceToClear() throws java.lang.Exception
AbstractService
waitForServiceToClear
in class AbstractService
java.lang.Exception
protected void killService()
AbstractService
killService
in class AbstractService
public void clearCache(SessionToken sessionToken) throws ComponentNotFoundException
clearCache
in interface QueryServiceInterface
ComponentNotFoundException
public java.util.Collection getAllQueries()
getAllQueries
in interface QueryServiceInterface
public void cancelQueries(SessionToken sessionToken, boolean shouldRollback) throws MetaMatrixComponentException
cancelQueries
in interface QueryServiceInterface
MetaMatrixComponentException
public java.util.Collection getQueriesForSession(SessionToken userToken)
public void cancelQuery(RequestID requestID, boolean shouldRollback) throws InvalidRequestIDException, MetaMatrixComponentException
cancelQuery
in interface QueryServiceInterface
InvalidRequestIDException
MetaMatrixComponentException
public void cancelQuery(AtomicRequestID ari) throws InvalidRequestIDException, MetaMatrixComponentException
cancelQuery
in interface QueryServiceInterface
InvalidRequestIDException
MetaMatrixComponentException
public java.util.Collection getQueueStatistics()
getQueueStatistics
in interface ServiceInterface
getQueueStatistics
in class AbstractService
public WorkerPoolStats getQueueStatistics(java.lang.String name)
getQueueStatistics
in interface ServiceInterface
getQueueStatistics
in class AbstractService
public java.util.Map getCaches() throws MetaMatrixComponentException
CacheAdmin
getCaches
in interface CacheAdmin
MetaMatrixComponentException
- If an error occurspublic void clearCache(java.lang.String name, java.util.Properties props) throws MetaMatrixComponentException
CacheAdmin
clearCache
in interface CacheAdmin
name
- Name of the cache to clearprops
- Optional additional properties which may vary by cache type
MetaMatrixComponentException
- If an error occurspublic void init(ServiceID id, DeployedComponentID deployedComponentID, java.util.Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager)
AbstractService
init
in interface ServiceInterface
init
in class AbstractService
id
- 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 QueryServiceInterface
AdminException
public void terminateTransaction(javax.transaction.xa.Xid transactionId) throws AdminException
terminateTransaction
in interface QueryServiceInterface
AdminException
protected TransactionService getTransactionService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |