Class SyncConfiguration.Builder
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.sync.internal.SyncConfiguration.Builder
-
- Enclosing class:
- SyncConfiguration
public static class SyncConfiguration.Builder extends Object
A builder that can build aSyncConfiguration
object.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Constructs a new builder.Builder(SyncConfiguration syncConfiguration)
Constructs a new builder from a SyncConfiguration.
-
Method Summary
Modifier and Type Method Description SyncConfiguration
build()
Builds theSyncConfiguration
.SyncConfiguration.Builder
withChangeEventListener(ChangeEventListener<?> changeEventListener)
Sets the changeEventListener for the SyncConfiguration.SyncConfiguration.Builder
withCodec(Codec<?> codec)
Sets the codec for the SyncConfiguration.SyncConfiguration.Builder
withConflictHandler(ConflictHandler<?> conflictHandler)
Sets the conflictHandler for the SyncConfiguration.SyncConfiguration.Builder
withExceptionListener(ExceptionListener exceptionListener)
Sets the exceptionListener for the SyncConfiguration.SyncConfiguration.Builder
withSyncFrequency(SyncFrequency syncFrequency)
Sets the syncFrequency for the SyncConfiguration.
-
-
-
Constructor Detail
-
Builder
public Builder()
Constructs a new builder.
-
Builder
public Builder(SyncConfiguration syncConfiguration)
Constructs a new builder from a SyncConfiguration.
-
-
Method Detail
-
withConflictHandler
public SyncConfiguration.Builder withConflictHandler(ConflictHandler<?> conflictHandler)
Sets the conflictHandler for the SyncConfiguration.- Parameters:
conflictHandler
- the ConflictHandler of the SyncConfiguration.- Returns:
- the builder.
-
withChangeEventListener
public SyncConfiguration.Builder withChangeEventListener(ChangeEventListener<?> changeEventListener)
Sets the changeEventListener for the SyncConfiguration.- Parameters:
changeEventListener
- the ChangeEventListener of the SyncConfiguration.- Returns:
- the builder.
-
withExceptionListener
public SyncConfiguration.Builder withExceptionListener(ExceptionListener exceptionListener)
Sets the exceptionListener for the SyncConfiguration.- Parameters:
exceptionListener
- the ExceptionListener of the SyncConfiguration.- Returns:
- the builder.
-
withSyncFrequency
public SyncConfiguration.Builder withSyncFrequency(SyncFrequency syncFrequency)
Sets the syncFrequency for the SyncConfiguration.- Parameters:
syncFrequency
- the SyncFrequency of the SyncConfiguration.- Returns:
- the builder.
-
withCodec
public SyncConfiguration.Builder withCodec(Codec<?> codec)
Sets the codec for the SyncConfiguration.- Parameters:
codec
- the Codec of the SyncConfiguration.- Returns:
- the builder.
-
build
public SyncConfiguration build() throws SyncConfigurationException
Builds theSyncConfiguration
.- Returns:
- the built
SyncConfiguration
. - Throws:
SyncConfigurationException
-
-