Add documentation
This commit is contained in:
parent
6d81699d5e
commit
9b6afa2350
@ -32,7 +32,7 @@ This project can be useful for different use cases:
|
||||
## Example usage
|
||||
|
||||
|
||||
###Create a Chronicle Store:
|
||||
### Create a Chronicle Store:
|
||||
|
||||
Please note that you must provide a way to serialize the data as binary.
|
||||
The easiest solution is to use a binary serialization protocol such as [Protobuf](https://developers.google.com/protocol-buffers/), [Avro](https://avro.apache.org/docs/current/), etc. In this case the binary serialization will be supported out of the box.
|
||||
@ -45,7 +45,7 @@ The 2nd and 3rd arguments are the serializer and deserializer for your data.
|
||||
ChronicleStore<DummyObject> chronicleStore = new ChronicleStore<>(PATH, DummyObject::toBinary, DummyObject::fromBinary);
|
||||
```
|
||||
|
||||
###Store a stream of data
|
||||
### Store a stream of data
|
||||
|
||||
The store method will return a handle that can be used to stop the storage.
|
||||
Otherwise the data stream will be store until it completes or an error is received on the stream.
|
||||
@ -55,7 +55,7 @@ Flux<DummyObject> source = ...
|
||||
Disposable handle = chronicleStore.store(source);
|
||||
```
|
||||
|
||||
###Subscribe to the store
|
||||
### Subscribe to the store
|
||||
|
||||
We can subscribe to the store and print old values, as well as new values being persisted in the store.
|
||||
|
||||
@ -79,7 +79,7 @@ In order to replay data with the original timing, we need to provide a function
|
||||
Chronicle-flux could potentially add a timestamp to the values when they are persisted, but this would be a poor design choice since the data would be timestamped at the very end of the chain, possibly after passing through several queues. It is in general a better idea to add a timestamp on the data as soon as they enter the system in order to have an accurate time.
|
||||
|
||||
|
||||
###Runnable demo
|
||||
### Runnable demo
|
||||
|
||||
if you want to run some code samples, have a look at the demo folder in the test directory that contains several runnable classes.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user