RIDING THE JET STREAMS FUAD MALIKOV | HAZELCAST JAVA 8 STREAM API - - PowerPoint PPT Presentation

riding the jet streams
SMART_READER_LITE
LIVE PREVIEW

RIDING THE JET STREAMS FUAD MALIKOV | HAZELCAST JAVA 8 STREAM API - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

RIDING THE JET STREAMS

FUAD MALIKOV | HAZELCAST

slide-2
SLIDE 2

WHAT IS IT?

JAVA 8 STREAM API

slide-3
SLIDE 3

PRE JAVA 8 HISTORIC TIMES

▸ Collections ▸ Iterators ▸ For loops ▸ If-else statements

JAVA 8

slide-4
SLIDE 4

WORD COUNT CODE

Pre Java 8

slide-5
SLIDE 5

Terminal operations

. Return concrete types or produce a side efgect. . Eagerly executed.

Function Output When to use reduce concrete type to cumulate elements collect list, map or set to group elements forEach side efgect to perform a side efgect
  • n elements
Common examples include:

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. library.stream() .map(Book::getAuthor) .fjlter(a -> a.getGender() == Gender.FEMALE) .map(Author::getAge) .fjlter(age -> age < 25) .reduce(0, Integer::sum):

Intermediate operations

. Always return streams.

Function Preserves count Preserves type Preserves
  • rder
map fjlter distinct sorted peek Common examples include:

. Lazily executed.

BROUGHT TO YOU BY
slide-6
SLIDE 6

WORD COUNT CODE

Post Java 8

slide-7
SLIDE 7

HAZELCAST

INTRODUCTION

slide-8
SLIDE 8

HAZELCAST

HAZELCAST EMBEDDED

▸ Distributed ▸ Sharded ▸ Embedded ▸ Java API

slide-9
SLIDE 9

HAZELCAST

HAZELCAST CLIENT-SERVER

▸ Distributed ▸ Sharded ▸ Client Driver ▸ Java API ▸ .NET, C++, Node.js

slide-10
SLIDE 10

HAZELCAST

slide-11
SLIDE 11

HAZELCAST

slide-12
SLIDE 12

HAZELCAST JET

INTRODUCTION

slide-13
SLIDE 13

JET

slide-14
SLIDE 14

WORD COUNT CODE

JET Distributed Streams

slide-15
SLIDE 15

JET

DIRECTED ACYCLIC GRAPH ENGINE

▸ JET Compute Engine ▸ Distributed Stream ▸ Embedded ▸ DAG API ▸ Java 8 Stream API ▸ Batch and Stream Oriented ▸ Serialization

slide-16
SLIDE 16

WORD COUNT CODE

JET DAG API

slide-17
SLIDE 17

JET

JET FEATURE OVERVIEW

slide-18
SLIDE 18

DEVELOPER PREVIEW OF JET

http://bit.ly/gime_jet

slide-19
SLIDE 19

THANK YOU & QUESTIONS?