Package org.teiid.query.tempdata
Class GlobalTableStoreImpl
- java.lang.Object
-
- org.teiid.query.tempdata.GlobalTableStoreImpl
-
- All Implemented Interfaces:
ReplicatedObject<String>
,GlobalTableStore
public class GlobalTableStoreImpl extends Object implements GlobalTableStore, ReplicatedObject<String>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GlobalTableStoreImpl.MatState
class
GlobalTableStoreImpl.MatTableInfo
-
Constructor Summary
Constructors Constructor Description GlobalTableStoreImpl(BufferManager bufferManager, VDBMetaData vdbMetaData, QueryMetadataInterface metadata)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TempTable
createMatTable(String tableName, GroupSymbol group)
void
droppedMembers(Collection<Serializable> addresses)
Called when members are droppedvoid
failedLoad(String matTableName)
Serializable
getAddress()
TempMetadataID
getCodeTableMetadataId(String codeTableName, String returnElementName, String keyElementName, String matTableName)
static Create
getCreateCommand(GroupSymbol group, boolean matview, QueryMetadataInterface metadata)
TempMetadataID
getGlobalTempTableMetadataId(Object viewId)
TempMetadataID
getGlobalTempTableMetadataId(String matTableName)
GlobalTableStoreImpl.MatTableInfo
getMatTableInfo(String tableName)
void
getState(OutputStream ostream)
Allows an application to write a state through a provided OutputStream.void
getState(String stateId, OutputStream ostream)
Allows an application to write a partial state through a provided OutputStream.TempTable
getTempTable(String matTableName)
TempTableStore
getTempTableStore()
boolean
hasState(String stateId)
Return true if the object has the given statevoid
loaded(String matTableName, TempTable table)
boolean
needsLoading(String matTableName, Serializable loadingAddress, boolean firstPass, boolean refresh, boolean invalidate)
static List<ElementSymbol>
resolveIndex(QueryMetadataInterface metadata, List<ElementSymbol> allColumns, Object pk)
Return a list of ElementSymbols for the given index/key objectvoid
setAddress(Serializable address)
Allows the replicator to set the local address from the channelvoid
setState(InputStream istream)
Allows an application to read a state through a provided InputStream.void
setState(String stateId, InputStream istream)
Allows an application to read a partial state through a provided InputStream.List<?>
updateMatViewRow(String matTableName, List<?> tuple, boolean delete)
-
-
-
Constructor Detail
-
GlobalTableStoreImpl
public GlobalTableStoreImpl(BufferManager bufferManager, VDBMetaData vdbMetaData, QueryMetadataInterface metadata)
-
-
Method Detail
-
getMatTableInfo
public GlobalTableStoreImpl.MatTableInfo getMatTableInfo(String tableName)
- Specified by:
getMatTableInfo
in interfaceGlobalTableStore
-
failedLoad
public void failedLoad(String matTableName)
- Specified by:
failedLoad
in interfaceGlobalTableStore
-
needsLoading
public boolean needsLoading(String matTableName, Serializable loadingAddress, boolean firstPass, boolean refresh, boolean invalidate)
- Specified by:
needsLoading
in interfaceGlobalTableStore
-
getGlobalTempTableMetadataId
public TempMetadataID getGlobalTempTableMetadataId(Object viewId) throws TeiidProcessingException, TeiidComponentException
- Specified by:
getGlobalTempTableMetadataId
in interfaceGlobalTableStore
- Throws:
TeiidProcessingException
TeiidComponentException
-
getCodeTableMetadataId
public TempMetadataID getCodeTableMetadataId(String codeTableName, String returnElementName, String keyElementName, String matTableName) throws TeiidComponentException, QueryMetadataException
- Specified by:
getCodeTableMetadataId
in interfaceGlobalTableStore
- Throws:
TeiidComponentException
QueryMetadataException
-
loaded
public void loaded(String matTableName, TempTable table)
- Specified by:
loaded
in interfaceGlobalTableStore
-
updateMatViewRow
public List<?> updateMatViewRow(String matTableName, List<?> tuple, boolean delete) throws TeiidComponentException
- Specified by:
updateMatViewRow
in interfaceGlobalTableStore
- Throws:
TeiidComponentException
-
getTempTableStore
public TempTableStore getTempTableStore()
-
createMatTable
public TempTable createMatTable(String tableName, GroupSymbol group) throws TeiidComponentException, QueryMetadataException, TeiidProcessingException
- Specified by:
createMatTable
in interfaceGlobalTableStore
- Throws:
TeiidComponentException
QueryMetadataException
TeiidProcessingException
-
getCreateCommand
public static Create getCreateCommand(GroupSymbol group, boolean matview, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException
-
resolveIndex
public static List<ElementSymbol> resolveIndex(QueryMetadataInterface metadata, List<ElementSymbol> allColumns, Object pk) throws TeiidComponentException, QueryMetadataException
Return a list of ElementSymbols for the given index/key object
-
setAddress
public void setAddress(Serializable address)
Description copied from interface:ReplicatedObject
Allows the replicator to set the local address from the channel- Specified by:
setAddress
in interfaceReplicatedObject<String>
-
getAddress
public Serializable getAddress()
- Specified by:
getAddress
in interfaceGlobalTableStore
-
getState
public void getState(OutputStream ostream)
Description copied from interface:ReplicatedObject
Allows an application to write a state through a provided OutputStream.- Specified by:
getState
in interfaceReplicatedObject<String>
- Parameters:
ostream
- the OutputStream
-
setState
public void setState(InputStream istream)
Description copied from interface:ReplicatedObject
Allows an application to read a state through a provided InputStream.- Specified by:
setState
in interfaceReplicatedObject<String>
- Parameters:
istream
- the InputStream
-
getState
public void getState(String stateId, OutputStream ostream)
Description copied from interface:ReplicatedObject
Allows an application to write a partial state through a provided OutputStream.- Specified by:
getState
in interfaceReplicatedObject<String>
- Parameters:
stateId
- id of the partial state requestedostream
- the OutputStream
-
setState
public void setState(String stateId, InputStream istream)
Description copied from interface:ReplicatedObject
Allows an application to read a partial state through a provided InputStream.- Specified by:
setState
in interfaceReplicatedObject<String>
- Parameters:
stateId
- id of the partial state requestedistream
- the InputStream
-
droppedMembers
public void droppedMembers(Collection<Serializable> addresses)
Description copied from interface:ReplicatedObject
Called when members are dropped- Specified by:
droppedMembers
in interfaceReplicatedObject<String>
-
hasState
public boolean hasState(String stateId)
Description copied from interface:ReplicatedObject
Return true if the object has the given state- Specified by:
hasState
in interfaceReplicatedObject<String>
- Returns:
-
getGlobalTempTableMetadataId
public TempMetadataID getGlobalTempTableMetadataId(String matTableName)
- Specified by:
getGlobalTempTableMetadataId
in interfaceGlobalTableStore
-
getTempTable
public TempTable getTempTable(String matTableName)
- Specified by:
getTempTable
in interfaceGlobalTableStore
-
-