@Singleton public class NoOpApiJobStore extends Object implements ApiJobStore
| Constructor and Description |
|---|
NoOpApiJobStore() |
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<JobRow> |
get(String id)
Returns a cold Observable that emits 0 or 1 messages: the desired JobRow, or nothing if there is no JobRow with
the specified id.
|
rx.Observable<JobRow> |
getAllRows()
A cold observable that emits a stream of JobRows until all JobRows have been retrieved from the store.
|
rx.Observable<JobRow> |
getFilteredRows(Set<JobRowFilter> jobRowFilter)
This method ignores the filters and returns an empty Observable.
|
rx.Observable<JobRow> |
save(JobRow metadata)
Returns a cold Observable that emits the JobRow that has been stored.
|
public rx.Observable<JobRow> get(String id)
ApiJobStore
If an error is encountered while interacting with the metadata store, then the Observable's onError is
called with the exception as payload.
get in interface ApiJobStoreid - The ID of the job desiredpublic rx.Observable<JobRow> save(JobRow metadata)
ApiJobStore
While the Observable should not emit a message until at least one subscriber has subscribed, it should store
the results immediately, without waiting for a subscriber.
If a row with the same ID already exists, then that row will be overwritten. Otherwise, a new ID-JobRow
mapping is added to the store. If an error is encountered while storing the data, the Observable instead invokes
the onError methods on its subscribers with an ApiJobStoreException
save in interface ApiJobStoremetadata - The Job metadata that needs to be storedpublic rx.Observable<JobRow> getAllRows()
ApiJobStoreonError is invoked, and the stream halts.getAllRows in interface ApiJobStorepublic rx.Observable<JobRow> getFilteredRows(Set<JobRowFilter> jobRowFilter)
getFilteredRows in interface ApiJobStorejobRowFilter - A Set of JobRowFilters where each JobRowFilter contains the JobField to be
filtered on, the filter operation and the values to be compared to.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.