Package io.objectbox.sync.server
Class SyncServerOptions
java.lang.Object
io.objectbox.flatbuffers.Table
io.objectbox.sync.server.SyncServerOptions
The Sync server configuration used to configure a starting Sync Server.
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription__assign(int _i, ByteBuffer _bb) void__init(int _i, ByteBuffer _bb) static voidaddAdminThreads(FlatBufferBuilder builder, long adminThreads) static voidaddAdminUrl(FlatBufferBuilder builder, int adminUrlOffset) static voidaddAuthenticationMethods(FlatBufferBuilder builder, int authenticationMethodsOffset) static voidaddCertificatePath(FlatBufferBuilder builder, int certificatePathOffset) static voidaddClusterFlags(FlatBufferBuilder builder, long clusterFlags) static voidaddClusterId(FlatBufferBuilder builder, int clusterIdOffset) static voidaddClusterPeers(FlatBufferBuilder builder, int clusterPeersOffset) static voidaddHistorySizeMaxKb(FlatBufferBuilder builder, long historySizeMaxKb) static voidaddHistorySizeTargetKb(FlatBufferBuilder builder, long historySizeTargetKb) static voidaddJwtConfig(FlatBufferBuilder builder, int jwtConfigOffset) static voidaddRequiredCredentials(FlatBufferBuilder builder, int requiredCredentialsOffset) static voidaddSyncFlags(FlatBufferBuilder builder, long syncFlags) static voidaddSyncServerFlags(FlatBufferBuilder builder, long syncServerFlags) static voidaddUrl(FlatBufferBuilder builder, int urlOffset) static voidaddWorkerThreads(FlatBufferBuilder builder, long workerThreads) longNumber of worker threads used by the Admin web server.adminUrl()URL of the Admin (web server) to bind to.authenticationMethods(int j) A list of enabled authentication methods available to Sync Clients to login.authenticationMethods(Credentials obj, int j) intThe SSL certificate directory; SSL will be enabled if not empty.longBit flags to configure the cluster behavior of this sync server (aka cluster peer).Enables cluster mode (requires the Cluster feature) and associates this cluster peer with the given ID.clusterPeers(int j) List of other (remote) cluster peers to connect to.clusterPeers(ClusterPeerConfig obj, int j) intstatic intcreateAuthenticationMethodsVector(FlatBufferBuilder builder, int[] data) static intcreateClusterPeersVector(FlatBufferBuilder builder, int[] data) static intcreateRequiredCredentialsVector(FlatBufferBuilder builder, long[] data) static intcreateSyncServerOptions(FlatBufferBuilder builder, int urlOffset, int authenticationMethodsOffset, long syncFlags, long syncServerFlags, int certificatePathOffset, long workerThreads, long historySizeMaxKb, long historySizeTargetKb, int adminUrlOffset, long adminThreads, int clusterIdOffset, int clusterPeersOffset, long clusterFlags, int jwtConfigOffset, int requiredCredentialsOffset) static intendSyncServerOptions(FlatBufferBuilder builder) static voidfinishSizePrefixedSyncServerOptionsBuffer(FlatBufferBuilder builder, int offset) static voidfinishSyncServerOptionsBuffer(FlatBufferBuilder builder, int offset) static SyncServerOptionsstatic SyncServerOptionslongOnce the maximum size is reached, old TX logs are deleted to stay below this limit.longOnce the maximum size (historySizeMaxKb) is reached, old TX logs are deleted until this size target is reached (lower than the maximum size).Optional configuration for JWT (JSON Web Token) authentication.longrequiredCredentials(int j) Credential types that are required for clients logging in.intstatic voidstartAuthenticationMethodsVector(FlatBufferBuilder builder, int numElems) static voidstartClusterPeersVector(FlatBufferBuilder builder, int numElems) static voidstartRequiredCredentialsVector(FlatBufferBuilder builder, int numElems) static voidstartSyncServerOptions(FlatBufferBuilder builder) longBit flags to configure the Sync Server that are also shared with Sync clients.longBit flags to configure the Sync Server.url()URL of this Sync Server on which the Sync protocol is exposed (where the server "binds" to).static voidlongBy default (absent or zero given), this uses a hardware dependent default, e.g.Methods inherited from class io.objectbox.flatbuffers.Table
__has_identifier, __indirect, __indirect, __offset, __offset, __reset, __reset, __string, __string, __union, __union, __vector, __vector_as_bytebuffer, __vector_in_bytebuffer, __vector_len, compareStrings, compareStrings, getByteBuffer, keysCompare, sortTables
-
Constructor Details
-
SyncServerOptions
public SyncServerOptions()
-
-
Method Details
-
ValidateVersion
public static void ValidateVersion() -
getRootAsSyncServerOptions
-
getRootAsSyncServerOptions
-
__init
-
__assign
-
url
URL of this Sync Server on which the Sync protocol is exposed (where the server "binds" to). This is typically a WebSockets URL, i.e. starting with "ws://" or "wss://" (with SSL enabled). Once running, Sync Clients can connect here. -
urlAsByteBuffer
-
urlInByteBuffer
-
authenticationMethods
A list of enabled authentication methods available to Sync Clients to login. -
authenticationMethods
-
authenticationMethodsLength
public int authenticationMethodsLength() -
authenticationMethodsVector
-
authenticationMethodsVector
-
syncFlags
public long syncFlags()Bit flags to configure the Sync Server that are also shared with Sync clients. -
syncServerFlags
public long syncServerFlags()Bit flags to configure the Sync Server. -
certificatePath
The SSL certificate directory; SSL will be enabled if not empty. Expects the files cert.pem and key.pem present in this directory. -
certificatePathAsByteBuffer
-
certificatePathInByteBuffer
-
workerThreads
public long workerThreads()By default (absent or zero given), this uses a hardware dependent default, e.g. 3 * CPU "cores" -
historySizeMaxKb
public long historySizeMaxKb()Once the maximum size is reached, old TX logs are deleted to stay below this limit. This is sometimes also called "history pruning" in the context of Sync. Absent or zero: no limit -
historySizeTargetKb
public long historySizeTargetKb()Once the maximum size (historySizeMaxKb) is reached, old TX logs are deleted until this size target is reached (lower than the maximum size). Using this target size typically lowers the frequency of history pruning and thus may improve efficiency. If absent or zero, it defaults to historySizeMaxKb. -
adminUrl
URL of the Admin (web server) to bind to. Once running, the user can open a browser to open the Admin web app. -
adminUrlAsByteBuffer
-
adminUrlInByteBuffer
-
adminThreads
public long adminThreads()Number of worker threads used by the Admin web server. -
clusterId
Enables cluster mode (requires the Cluster feature) and associates this cluster peer with the given ID. Cluster peers need to share the same ID to be in the same cluster. -
clusterIdAsByteBuffer
-
clusterIdInByteBuffer
-
clusterPeers
List of other (remote) cluster peers to connect to. -
clusterPeers
-
clusterPeersLength
public int clusterPeersLength() -
clusterPeersVector
-
clusterPeersVector
-
clusterFlags
public long clusterFlags()Bit flags to configure the cluster behavior of this sync server (aka cluster peer). -
jwtConfig
Optional configuration for JWT (JSON Web Token) authentication. -
jwtConfig
-
requiredCredentials
public long requiredCredentials(int j) Credential types that are required for clients logging in. -
requiredCredentialsLength
public int requiredCredentialsLength() -
requiredCredentialsVector
-
requiredCredentialsVector
-
requiredCredentialsAsByteBuffer
-
requiredCredentialsInByteBuffer
-
createSyncServerOptions
public static int createSyncServerOptions(FlatBufferBuilder builder, int urlOffset, int authenticationMethodsOffset, long syncFlags, long syncServerFlags, int certificatePathOffset, long workerThreads, long historySizeMaxKb, long historySizeTargetKb, int adminUrlOffset, long adminThreads, int clusterIdOffset, int clusterPeersOffset, long clusterFlags, int jwtConfigOffset, int requiredCredentialsOffset) -
startSyncServerOptions
-
addUrl
-
addAuthenticationMethods
public static void addAuthenticationMethods(FlatBufferBuilder builder, int authenticationMethodsOffset) -
createAuthenticationMethodsVector
-
startAuthenticationMethodsVector
-
addSyncFlags
-
addSyncServerFlags
-
addCertificatePath
-
addWorkerThreads
-
addHistorySizeMaxKb
-
addHistorySizeTargetKb
-
addAdminUrl
-
addAdminThreads
-
addClusterId
-
addClusterPeers
-
createClusterPeersVector
-
startClusterPeersVector
-
addClusterFlags
-
addJwtConfig
-
addRequiredCredentials
-
createRequiredCredentialsVector
-
startRequiredCredentialsVector
-
endSyncServerOptions
-
finishSyncServerOptionsBuffer
-
finishSizePrefixedSyncServerOptionsBuffer
-