Modifier and Type | Method and Description |
---|---|
Options.BuilderObservable |
fileFactory(Callable<File> fileFactory)
Sets the file factory to be used by the queue storage mechanism.
|
Options.BuilderObservable |
pageSizeBytes(int pageSizeBytes)
Sets the page size in bytes.
|
Options.BuilderObservable |
scheduler(io.reactivex.Scheduler scheduler)
Sets the scheduler to use for reading items from files and emitting
them.
|
<T> io.reactivex.functions.Function<io.reactivex.Observable<T>,io.reactivex.Flowable<T>> |
serializer(DataSerializer<T> ds) |
<T> io.reactivex.functions.Function<io.reactivex.Observable<T>,io.reactivex.Flowable<T>> |
serializer(Serializer<T> serializer) |
io.reactivex.functions.Function<io.reactivex.Observable<byte[]>,io.reactivex.Flowable<byte[]>> |
serializerBytes()
Returns a Flowable Transformer that buffers items to disk (files).
|
<T extends Serializable> |
serializerJavaIO()
Returns a Flowable Transformer to buffer stream items to disk
(files).
|
io.reactivex.functions.Function<io.reactivex.Observable<String>,io.reactivex.Flowable<String>> |
serializerUtf8() |
public Options.BuilderObservable pageSizeBytes(int pageSizeBytes)
pageSizeBytes
- the page size in bytes.public Options.BuilderObservable scheduler(io.reactivex.Scheduler scheduler)
scheduler
- for emitting itemspublic Options.BuilderObservable fileFactory(Callable<File> fileFactory)
File.createTempFile("bufferToFileDb","")
if
this method is not called.fileFactory
- the factorypublic <T extends Serializable> io.reactivex.functions.Function<io.reactivex.Observable<T>,io.reactivex.Flowable<T>> serializerJavaIO()
java.io.ObjectOutputStream
for writing values to disk and
java.io.ObjectInputStream
for reading values from disk and
emitting them. Note that this is a pretty verbose serialization
method for small items in that a 4 byte Integer is serialized to an
81 byte array!T
- stream item typepublic io.reactivex.functions.Function<io.reactivex.Observable<byte[]>,io.reactivex.Flowable<byte[]>> serializerBytes()
public io.reactivex.functions.Function<io.reactivex.Observable<String>,io.reactivex.Flowable<String>> serializerUtf8()
public <T> io.reactivex.functions.Function<io.reactivex.Observable<T>,io.reactivex.Flowable<T>> serializer(Serializer<T> serializer)
public <T> io.reactivex.functions.Function<io.reactivex.Observable<T>,io.reactivex.Flowable<T>> serializer(DataSerializer<T> ds)
Copyright © 2013–2020. All rights reserved.