Package org.aktin.broker.db
Class AggregatorImpl
java.lang.Object
org.aktin.broker.db.AggregatorImpl
- All Implemented Interfaces:
AggregatorBackend,Aggregator
@Singleton public class AggregatorImpl extends Object implements AggregatorBackend
-
Constructor Summary
Constructors Constructor Description AggregatorImpl()AggregatorImpl(DataSource ds, Path dataDir) -
Method Summary
Modifier and Type Method Description voidaddOrReplaceResult(int requestId, int nodeId, javax.ws.rs.core.MediaType mediaType, InputStream content)voidclearDataDirectory()Delete all files in the data directory.String[]getDistinctResultTypes(int requestId)PathDataSourcegetResult(int requestId, int nodeId)booleanisRequestWritable(int requestId, int nodeId)List<ResultInfo>listResults(int requestId)voidsetBrokerDB(DataSource ds)voidsetDataDirectory(Path dataDir)
-
Constructor Details
-
AggregatorImpl
- Throws:
IOException
-
AggregatorImpl
- Throws:
IOException
-
-
Method Details
-
setDataDirectory
- Throws:
IOException
-
setBrokerDB
- Specified by:
setBrokerDBin interfaceAggregatorBackend
-
clearDataDirectory
Description copied from interface:AggregatorBackendDelete all files in the data directory. This should be used only for testing.- Specified by:
clearDataDirectoryin interfaceAggregatorBackend- Throws:
IOException- IO error
-
listResults
- Specified by:
listResultsin interfaceAggregator- Throws:
SQLException
-
getResult
- Specified by:
getResultin interfaceAggregator- Throws:
SQLException
-
addOrReplaceResult
public void addOrReplaceResult(int requestId, int nodeId, javax.ws.rs.core.MediaType mediaType, InputStream content) throws SQLException- Specified by:
addOrReplaceResultin interfaceAggregatorBackend- Throws:
SQLException
-
getDistinctResultTypes
- Specified by:
getDistinctResultTypesin interfaceAggregator- Throws:
SQLException
-
isRequestWritable
public boolean isRequestWritable(int requestId, int nodeId)- Specified by:
isRequestWritablein interfaceAggregatorBackend
-