본문 바로가기

Android/RX

(5)
4. 공통 소스 (참고용) import java.time.LocalTime; import java.time.format.DateTimeFormatter; public class TimeUtil { public static long start; public static long end; final static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss.SSS"); public static long start(){ start = System.currentTimeMillis(); return start; } public static void end(){ end = System.currentTimeMillis(); } public static void take..
4. Simple, Maybe, Completable 참고 공통 소스 dennis.tistory.com/30 4. 공통 소스 (참고용) import java.time.LocalTime; import java.time.format.DateTimeFormatter; public class TimeUtil { public static long start; public static long end; final static DateTimeFormatter formatter = DateTimeFo.. dennis.tistory.com Single - 데이터를 1건만 통지하거나 에러를 통지한다. - 데이터 통지 자체가 완료를 의미하기 때문에 완료 통지는 하지 않는다. - 데이터를 1건만 통지하므로 데이터 개수를 요청할 필요가 없다. - onNext( ), onCompl..
4. Observable, Flowable Observable과 Flowable 비교 Flowable Observable Reactive Streams 인터페이스를 구현함 Reactive Streams 인터페이스를 구현하지 않음 Subscriber에서 데이터를 처리한다. Observer에서 데이터를 처리한다. 데이터 개수를 제어하는 배압 기능이 있음 데이터 개수를 제어하는 배압 기능이 없음 Subscription으로 전달 받는 데이터 개수를 제어할 수 있다. 배압 기능이 없기때문에 데이터 개수를 제어할 수 없다. Subscription으로 구독을 해지한다. Disposable로 구독을 해지한다. 참고 공통 소스 dennis.tistory.com/30 4. 공통 소스 (참고용) import java.time.LocalTime; import java..
4. Reactive Streams Reactive Streams란? https://github.com/reactive-streams/reactive-streams-jvm/ reactive-streams/reactive-streams-jvm Reactive Streams Specification for the JVM. Contribute to reactive-streams/reactive-streams-jvm development by creating an account on GitHub. github.com 1. 리액티브 프로그래밍 라이브러리의 표준 사양 2. 리액티브 프로그래밍에 대한 인터페이스만 제공 3. Reactive Streams는 Publisher, Subscriber, Subscription, Processor 라는 4개의 ..
4. 리액티브 프로그래밍이란 ? 리액티브 프로그래밍(Reactive Programming)이란? : In computing, reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. (변화의 전파와 데이터 흐름과 관련된 선언적 프로그래밍 패러다임이다.) -변화의 전파와 데이터 흐름 : 데이터가 변경 될 때 마다 이벤트를 발생시켜서 데이터를 계속적으로 전달한다. -선언적 프로그래밍 : 실행할 동작을 구체적으로 명시하는 명령형 프로그래밍과 달리 선언형 프로그래밍은 단순히 목표를 선언한다. 리액티브의 개념이 적용된 예 1. Push 방식 : 데이터의 변화가 발생했을 때 변경이 발생한 곳에서..