org.teiid.dqp.internal.process
Class DQPCore

java.lang.Object
  extended by org.teiid.dqp.internal.process.DQPCore
All Implemented Interfaces:
DQP

public class DQPCore
extends java.lang.Object
implements DQP

Implements the core DQP processing.


Nested Class Summary
static interface DQPCore.CompletionListener<T>
           
static interface DQPCore.ContextProvider
           
static class DQPCore.FutureWork<T>
           
 
Constructor Summary
DQPCore()
           
 
Method Summary
 ResultsFuture<?> begin()
           
 boolean cancelRequest(long requestID)
           
 boolean cancelRequest(java.lang.String sessionId, long executionId)
           
 void clearCache(java.lang.String cacheType)
           
 void clearCache(java.lang.String cacheType, java.lang.String vdbName, int version)
           
 ResultsFuture<?> closeLobChunkStream(int lobRequestId, long requestId, java.lang.String streamId)
           
 ResultsFuture<?> closeRequest(long requestId)
           
 ResultsFuture<?> commit()
           
 ResultsFuture<?> commit(XidImpl xid, boolean onePhase)
           
 ResultsFuture<?> end(XidImpl xid, int flags)
           
 ResultsFuture<ResultsMessage> executeRequest(long reqID, RequestMessage requestMsg)
           
 ResultsFuture<?> forget(XidImpl xid)
           
 BufferManager getBufferManager()
           
 CacheStatisticsMetadata getCacheStatistics(java.lang.String cacheType)
           
 java.util.Collection<java.lang.String> getCacheTypes()
           
 org.teiid.dqp.internal.process.DQPCore.ClientState getClientState(java.lang.String key, boolean create)
           
 TempTableDataManager getDataTierManager()
           
 java.util.List<RequestMetadata> getLongRunningRequests()
           
 int getMaxActivePlans()
           
 int getMaxSourceRows()
           
 MetadataResult getMetadata(long requestID)
           
 MetadataResult getMetadata(long requestID, java.lang.String preparedSql, boolean allowDoubleQuotedVariable)
           
 java.util.List<RequestMetadata> getRequests()
          Return a list of all RequestMetadata
 java.util.List<RequestMetadata> getRequestsForSession(java.lang.String sessionId)
          Return a list of RequestMetadata for the given session
 java.util.Collection<Transaction> getTransactions()
           
 TransactionService getTransactionService()
           
 int getUserRequestSourceConcurrency()
           
 WorkerPoolStatisticsMetadata getWorkerPoolStatistics()
           
 boolean isExceptionOnMaxSourceRows()
           
 ResultsFuture<java.lang.Integer> prepare(XidImpl xid)
           
 ResultsFuture<ResultsMessage> processCursorRequest(long reqID, int batchFirst, int fetchSize)
           
 ResultsFuture<javax.transaction.xa.Xid[]> recover(int flag)
           
 void refreshMatView(DQPCore.ContextProvider contextProvider, java.lang.String vdbName, int vdbVersion, java.lang.String viewName)
           
 ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId, long requestId, java.lang.String streamId)
           
 ResultsFuture<?> rollback()
           
 ResultsFuture<?> rollback(XidImpl xid)
           
 void setBufferService(BufferService service)
           
 void setCacheFactory(CacheFactory factory)
           
 void setEventDistributor(EventDistributor eventDistributor)
           
 void setMetadataRepository(MetadataRepository metadataRepository)
           
 void setTransactionService(TransactionService service)
           
 void start(DQPConfiguration config)
           
 ResultsFuture<?> start(XidImpl xid, int flags, int timeout)
           
 void stop()
          perform a full shutdown and wait for 10 seconds for all threads to finish
 void synchronizeInternalMaterializedViews(DQPCore.ContextProvider contextProvider)
           
 void terminateSession(java.lang.String sessionId)
           
 void terminateTransaction(java.lang.String xid)
           
 void updateMatViewRow(DQPCore.ContextProvider contextProvider, java.lang.String vdbName, int vdbVersion, java.lang.String schema, java.lang.String viewName, java.util.List<?> tuple, boolean delete)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DQPCore

public DQPCore()
Method Detail

stop

public void stop()
perform a full shutdown and wait for 10 seconds for all threads to finish


getRequestsForSession

public java.util.List<RequestMetadata> getRequestsForSession(java.lang.String sessionId)
Return a list of RequestMetadata for the given session


getClientState

public org.teiid.dqp.internal.process.DQPCore.ClientState getClientState(java.lang.String key,
                                                                         boolean create)

getRequests

public java.util.List<RequestMetadata> getRequests()
Return a list of all RequestMetadata


getLongRunningRequests

public java.util.List<RequestMetadata> getLongRunningRequests()

executeRequest

public ResultsFuture<ResultsMessage> executeRequest(long reqID,
                                                    RequestMessage requestMsg)
Specified by:
executeRequest in interface DQP

processCursorRequest

public ResultsFuture<ResultsMessage> processCursorRequest(long reqID,
                                                          int batchFirst,
                                                          int fetchSize)
                                                   throws TeiidProcessingException
Specified by:
processCursorRequest in interface DQP
Throws:
TeiidProcessingException

closeLobChunkStream

public ResultsFuture<?> closeLobChunkStream(int lobRequestId,
                                            long requestId,
                                            java.lang.String streamId)
                                     throws TeiidProcessingException
Specified by:
closeLobChunkStream in interface DQP
Throws:
TeiidProcessingException

requestNextLobChunk

public ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId,
                                                   long requestId,
                                                   java.lang.String streamId)
                                            throws TeiidProcessingException
Specified by:
requestNextLobChunk in interface DQP
Throws:
TeiidProcessingException

getWorkerPoolStatistics

public WorkerPoolStatisticsMetadata getWorkerPoolStatistics()

terminateSession

public void terminateSession(java.lang.String sessionId)

cancelRequest

public boolean cancelRequest(java.lang.String sessionId,
                             long executionId)
                      throws TeiidComponentException
Throws:
TeiidComponentException

closeRequest

public ResultsFuture<?> closeRequest(long requestId)
                              throws TeiidProcessingException,
                                     TeiidComponentException
Specified by:
closeRequest in interface DQP
Throws:
TeiidProcessingException
TeiidComponentException

getCacheStatistics

public CacheStatisticsMetadata getCacheStatistics(java.lang.String cacheType)

getCacheTypes

public java.util.Collection<java.lang.String> getCacheTypes()

clearCache

public void clearCache(java.lang.String cacheType)

clearCache

public void clearCache(java.lang.String cacheType,
                       java.lang.String vdbName,
                       int version)

getTransactions

public java.util.Collection<Transaction> getTransactions()

terminateTransaction

public void terminateTransaction(java.lang.String xid)
                          throws AdminException
Throws:
AdminException

getDataTierManager

public TempTableDataManager getDataTierManager()

getBufferManager

public BufferManager getBufferManager()

getTransactionService

public TransactionService getTransactionService()

start

public void start(DQPConfiguration config)

synchronizeInternalMaterializedViews

public void synchronizeInternalMaterializedViews(DQPCore.ContextProvider contextProvider)

refreshMatView

public void refreshMatView(DQPCore.ContextProvider contextProvider,
                           java.lang.String vdbName,
                           int vdbVersion,
                           java.lang.String viewName)

updateMatViewRow

public void updateMatViewRow(DQPCore.ContextProvider contextProvider,
                             java.lang.String vdbName,
                             int vdbVersion,
                             java.lang.String schema,
                             java.lang.String viewName,
                             java.util.List<?> tuple,
                             boolean delete)

setBufferService

public void setBufferService(BufferService service)

setTransactionService

public void setTransactionService(TransactionService service)

setMetadataRepository

public void setMetadataRepository(MetadataRepository metadataRepository)

setEventDistributor

public void setEventDistributor(EventDistributor eventDistributor)

cancelRequest

public boolean cancelRequest(long requestID)
                      throws TeiidProcessingException,
                             TeiidComponentException
Specified by:
cancelRequest in interface DQP
Throws:
TeiidProcessingException
TeiidComponentException

begin

public ResultsFuture<?> begin()
                       throws XATransactionException
Specified by:
begin in interface DQP
Throws:
XATransactionException

commit

public ResultsFuture<?> commit()
                        throws XATransactionException
Specified by:
commit in interface DQP
Throws:
XATransactionException

rollback

public ResultsFuture<?> rollback()
                          throws XATransactionException
Specified by:
rollback in interface DQP
Throws:
XATransactionException

commit

public ResultsFuture<?> commit(XidImpl xid,
                               boolean onePhase)
                        throws XATransactionException
Specified by:
commit in interface DQP
Throws:
XATransactionException

end

public ResultsFuture<?> end(XidImpl xid,
                            int flags)
                     throws XATransactionException
Specified by:
end in interface DQP
Throws:
XATransactionException

forget

public ResultsFuture<?> forget(XidImpl xid)
                        throws XATransactionException
Specified by:
forget in interface DQP
Throws:
XATransactionException

prepare

public ResultsFuture<java.lang.Integer> prepare(XidImpl xid)
                                         throws XATransactionException
Specified by:
prepare in interface DQP
Throws:
XATransactionException

recover

public ResultsFuture<javax.transaction.xa.Xid[]> recover(int flag)
                                                  throws XATransactionException
Specified by:
recover in interface DQP
Throws:
XATransactionException

rollback

public ResultsFuture<?> rollback(XidImpl xid)
                          throws XATransactionException
Specified by:
rollback in interface DQP
Throws:
XATransactionException

start

public ResultsFuture<?> start(XidImpl xid,
                              int flags,
                              int timeout)
                       throws XATransactionException
Specified by:
start in interface DQP
Throws:
XATransactionException

getMetadata

public MetadataResult getMetadata(long requestID)
                           throws TeiidComponentException,
                                  TeiidProcessingException
Specified by:
getMetadata in interface DQP
Throws:
TeiidComponentException
TeiidProcessingException

getMetadata

public MetadataResult getMetadata(long requestID,
                                  java.lang.String preparedSql,
                                  boolean allowDoubleQuotedVariable)
                           throws TeiidComponentException,
                                  TeiidProcessingException
Specified by:
getMetadata in interface DQP
Throws:
TeiidComponentException
TeiidProcessingException

isExceptionOnMaxSourceRows

public boolean isExceptionOnMaxSourceRows()

getMaxSourceRows

public int getMaxSourceRows()

setCacheFactory

public void setCacheFactory(CacheFactory factory)

getUserRequestSourceConcurrency

public int getUserRequestSourceConcurrency()

getMaxActivePlans

public int getMaxActivePlans()


Copyright © 2011. All Rights Reserved.