Skip to content

Instantly share code, notes, and snippets.

View jemshit's full-sized avatar
👑
Solving Problems

Jemshit Iskanderov jemshit

👑
Solving Problems
View GitHub Profile
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:
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:
@jemshit
jemshit / LazySingletonThreadSafe3.java
Last active November 6, 2016 19:35 — forked from oznus/LazySingletonThreadSafe3.java
Singleton: synchronized, shared across Threads
public class LazySingleton {
private LazySingleton() {
}
private static volatile LazySingleton sInstance;
public static LazySingleton getInstance() {
if (sInstance == null) {