public interface SynchronizerClientFactory
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the client factory.
|
<T> RevisionedStreamClient<T> |
createRevisionedStreamClient(java.lang.String streamName,
Serializer<T> serializer,
SynchronizerConfig config)
Creates a new RevisionedStreamClient that will work with the specified stream.
|
<StateT extends Revisioned,UpdateT extends Update<StateT>,InitT extends InitialUpdate<StateT>> |
createStateSynchronizer(java.lang.String streamName,
Serializer<UpdateT> updateSerializer,
Serializer<InitT> initSerializer,
SynchronizerConfig config)
Creates a new StateSynchronizer that will work on the specified stream.
|
static SynchronizerClientFactory |
withScope(java.lang.String scope,
ClientConfig config)
Creates a new instance of Client Factory.
|
static SynchronizerClientFactory withScope(java.lang.String scope, ClientConfig config)
scope
- The scope string.config
- Configuration for the client.<T> RevisionedStreamClient<T> createRevisionedStreamClient(java.lang.String streamName, Serializer<T> serializer, SynchronizerConfig config)
T
- The type of events.streamName
- The name of the stream for the synchronizer.serializer
- The serializer for updates.config
- The client configuration.<StateT extends Revisioned,UpdateT extends Update<StateT>,InitT extends InitialUpdate<StateT>> StateSynchronizer<StateT> createStateSynchronizer(java.lang.String streamName, Serializer<UpdateT> updateSerializer, Serializer<InitT> initSerializer, SynchronizerConfig config)
StateT
- The type of the state being synchronized.UpdateT
- The type of the updates being written.InitT
- The type of the initial update used.streamName
- The name of the stream for the synchronizer.updateSerializer
- The serializer for updates.initSerializer
- The serializer for the initial update.config
- The synchronizer configuration.void close()
close
in interface java.lang.AutoCloseable
AutoCloseable.close()