use of com.hazelcast.core.IList in project hazelcast-jet by hazelcast.
the class SkipTest method intermediateOperation_sourceCache.
@Test
public void intermediateOperation_sourceCache() {
int skip = 10;
IList list = streamCache().map(Entry::getValue).skip(skip).collect(DistributedCollectors.toIList(randomString()));
assertEquals(COUNT - skip, list.size());
}
use of com.hazelcast.core.IList in project hazelcast-jet-reference-manual by hazelcast.
the class ImdgConnectors method s14.
static void s14() {
JetInstance jet = Jet.newJetInstance();
// tag::s14[]
IList<Integer> inputList = jet.getList("inputList");
for (int i = 0; i < 10; i++) {
inputList.add(i);
}
Pipeline p = Pipeline.create();
p.drawFrom(Sources.<Integer>list("inputList")).map(i -> "item" + i).drainTo(Sinks.list("resultList"));
jet.newJob(p).join();
IList<String> resultList = jet.getList("resultList");
System.out.println("Results: " + new ArrayList<>(resultList));
// end::s14[]
}
Aggregations