-
Notifications
You must be signed in to change notification settings - Fork 5
/
IDifferential.java
34 lines (22 loc) · 922 Bytes
/
IDifferential.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.genericsystem.common;
import org.genericsystem.api.core.Snapshot;
import org.genericsystem.api.core.exceptions.ConcurrencyControlException;
import org.genericsystem.api.core.exceptions.OptimisticLockConstraintViolationException;
import org.genericsystem.defaults.DefaultGeneric;
import io.reactivex.Observable;
/**
* @author Nicolas Feybesse
*
*/
public interface IDifferential<T extends DefaultGeneric<T>> {
long getTs();
Snapshot<T> getDependencies(T generic);
Observable<?> getDifferentialObservable();
void apply(Snapshot<T> removes, Snapshot<T> adds) throws ConcurrencyControlException, OptimisticLockConstraintViolationException;
Observable<Generic> getAddsObservable(Generic generic);
Observable<Generic> getRemovesObservable(Generic generic);
default AbstractCache getCache() {
return null;
}
// CompletableFuture<Snapshot<Generic>> getDependenciesPromise(Generic generic);
}