public class HashJobStore extends Object implements ApiJobStore
|Constructor and Description|
Constructs an empty HashJobStore, using a
Builds a job store using the passed in map as the backing store.
|Modifier and Type||Method and Description|
Returns a cold Observable that emits 0 or 1 messages: the desired JobRow, or nothing if there is no JobRow with the specified id.
A cold observable that emits a stream of JobRows until all JobRows have been retrieved from the store.
This method takes a Set of JobRowFilters, ANDS them by default, and returns a cold observable that emits a stream of JobRows which satisfy the given filter.
Returns a cold Observable that emits the JobRow that has been stored.
store- The map to use to store job metadata
LinkedHashMapas the backing store.
If an error is encountered while interacting with the metadata store, then the Observable's
called with the exception as payload.
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
onError methods on its subscribers with an
public rx.Observable<JobRow> getAllRows()
onErroris invoked, and the stream halts.
public rx.Observable<JobRow> getFilteredRows(Set<JobRowFilter> jobRowFilters) throws IllegalArgumentException
Any of the fields may be not filterable for every implementation of the
ApiJobStore as the efficiency of
filtering is dependent on the backing store. An IllegalArgumentException is thrown if filtering on any given
field is not supported.
jobRowFilters- A Set of JobRowFilters where each JobRowFilter contains the JobField to be filtered on, the filter operation and the values to be compared to.
IllegalArgumentException- if filtering on any field is not supported
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.