This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.jakewharton.rx.ReplayingShare; | |
import com.jakewharton.rxrelay2.PublishRelay; | |
import com.jakewharton.rxrelay2.Relay; | |
import io.reactivex.Observable; | |
import java.util.concurrent.TimeUnit; | |
public class HotReactiveDataExpiration { | |
// Problems to solve: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.jakewharton.rx.ReplayingShare; | |
import com.jakewharton.rxrelay2.PublishRelay; | |
import com.jakewharton.rxrelay2.Relay; | |
import io.reactivex.Observable; | |
import java.util.concurrent.TimeUnit; | |
public class HotReactiveData { | |
// Problems to solve: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LazySingleton { | |
private LazySingleton() { | |
} | |
private static volatile LazySingleton sInstance; | |
public static LazySingleton getInstance() { | |
if (sInstance == null) { |
NewerOlder