use of cz.o2.proxima.functional.Factory in project proxima-platform by O2-Czech-Republic.
the class WebsocketReader method asFactory.
@Override
public Factory<?> asFactory() {
final EntityDescriptor entity = getEntityDescriptor();
final URI uri = getUri();
final Map<String, Object> cfg = this.cfg;
return repo -> new WebsocketReader(entity, uri, cfg);
}
use of cz.o2.proxima.functional.Factory in project proxima-platform by O2-Czech-Republic.
the class OpenTsdbWriter method asFactory.
@Override
public Factory<?> asFactory() {
final EntityDescriptor entity = getEntityDescriptor();
final URI uri = getUri();
final Map<String, Object> cfg = getCfg();
return repo -> new OpenTsdbWriter(entity, uri, cfg);
}
use of cz.o2.proxima.functional.Factory in project proxima-platform by O2-Czech-Republic.
the class HBaseLogReader method asFactory.
@Override
public Factory<?> asFactory() {
final URI uri = getUri();
final EntityDescriptor entity = this.entity;
final cz.o2.proxima.functional.Factory<ExecutorService> executorFactory = this.executorFactory;
final byte[] serializedConf = this.serializedConf;
return repo -> new HBaseLogReader(uri, deserialize(serializedConf, new Configuration()), entity, executorFactory);
}
use of cz.o2.proxima.functional.Factory in project proxima-platform by O2-Czech-Republic.
the class TransformingCqlFactoryTest method setup.
@Before
public void setup() throws URISyntaxException {
statements.clear();
factory = new TransformingCqlFactory<String>(i -> new String(i.getValue()), Arrays.asList("a", "b"), Arrays.asList(p -> "a_" + p.getFirst() + "_" + p.getSecond(), p -> "b_" + p.getFirst() + "_" + p.getSecond())) {
@Override
protected String createInsertStatement(StreamElement ingest) {
String s = super.createInsertStatement(ingest);
statements.add(s);
return s;
}
};
factory.setup(entity, new URI("cassandra://wherever/my_table/"), StringConverter.getDefault());
}
use of cz.o2.proxima.functional.Factory in project proxima-platform by O2-Czech-Republic.
the class GCloudLogReader method asFactory.
@Override
public Factory<?> asFactory() {
final GCloudStorageAccessor accessor = (GCloudStorageAccessor) getAccessor();
final Context context = getContext();
return repo -> new GCloudLogReader(accessor, context);
}
Aggregations