RIDING THE JET STREAMS FUAD MALIKOV | HAZELCAST
JAVA 8 STREAM API WHAT IS IT?
JAVA 8 PRE JAVA 8 HISTORIC TIMES ▸ Collections ▸ Iterators ▸ For loops ▸ If-else statements
WORD COUNT CODE Pre Java 8
Stream examples Get the unique surnames in uppercase of the fjrst 15 book authors that are 50 years old or over. library.stream() .map(book -> book.getAuthor()) .fjlter( author -> author.getAge() >= 50) .distinct() .limit(15) .map(Author::getSurname) .map(String::toUpperCase) .collect(toList()); Compute the sum of ages of all female authors younger than 25. Intermediate operations library.stream() .map(Book::getAuthor) . Always return streams. . Lazily executed. .fjlter( a -> a.getGender() == Gender.FEMALE) .map(Author::getAge) .fjlter( age -> age < 25) .reduce(0, Integer::sum): Common examples include: Preserves Preserves Preserves Terminal operations Function count type order . Return concrete types or produce a side efgect. . Eagerly executed. map Common examples include: fjlter Function Output When to use distinct reduce concrete type to cumulate elements sorted collect list, map or set to group elements to perform a side efgect peek forEach side efgect on elements BROUGHT TO YOU BY
WORD COUNT CODE Post Java 8
INTRODUCTION HAZELCAST
HAZELCAST HAZELCAST EMBEDDED ▸ Distributed ▸ Sharded ▸ Embedded ▸ Java API
HAZELCAST HAZELCAST CLIENT-SERVER ▸ Distributed ▸ Sharded ▸ Client Driver ▸ Java API ▸ .NET, C++, Node.js
HAZELCAST
HAZELCAST
INTRODUCTION HAZELCAST JET
JET
WORD COUNT CODE JET Distributed Streams
JET DIRECTED ACYCLIC GRAPH ENGINE ▸ JET Compute Engine ▸ Distributed Stream ▸ Embedded ▸ DAG API ▸ Java 8 Stream API ▸ Batch and Stream Oriented ▸ Serialization
WORD COUNT CODE JET DAG API
JET JET FEATURE OVERVIEW
DEVELOPER PREVIEW OF JET http://bit.ly/gime_jet
THANK YOU & QUESTIONS?
Recommend
More recommend