Package io.objectbox.sync.server
Class SyncServerOptions
- java.lang.Object
-
- io.objectbox.flatbuffers.Table
-
- io.objectbox.sync.server.SyncServerOptions
-
public final class SyncServerOptions extends Table
The Sync server configuration used to configure a starting Sync Server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSyncServerOptions.Vector
-
Constructor Summary
Constructors Constructor Description SyncServerOptions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SyncServerOptions__assign(int _i, java.nio.ByteBuffer _bb)void__init(int _i, java.nio.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)longadminThreads()Number of worker threads used by the Admin web server.java.lang.StringadminUrl()URL of the Admin (web server) to bind to.java.nio.ByteBufferadminUrlAsByteBuffer()java.nio.ByteBufferadminUrlInByteBuffer(java.nio.ByteBuffer _bb)CredentialsauthenticationMethods(int j)A list of enabled authentication methods available to Sync Clients to login.CredentialsauthenticationMethods(Credentials obj, int j)intauthenticationMethodsLength()Credentials.VectorauthenticationMethodsVector()Credentials.VectorauthenticationMethodsVector(Credentials.Vector obj)java.lang.StringcertificatePath()The SSL certificate directory; SSL will be enabled if not empty.java.nio.ByteBuffercertificatePathAsByteBuffer()java.nio.ByteBuffercertificatePathInByteBuffer(java.nio.ByteBuffer _bb)longclusterFlags()Bit flags to configure the cluster behavior of this sync server (aka cluster peer).java.lang.StringclusterId()Enables cluster mode (requires the Cluster feature) and associates this cluster peer with the given ID.java.nio.ByteBufferclusterIdAsByteBuffer()java.nio.ByteBufferclusterIdInByteBuffer(java.nio.ByteBuffer _bb)ClusterPeerConfigclusterPeers(int j)List of other (remote) cluster peers to connect to.ClusterPeerConfigclusterPeers(ClusterPeerConfig obj, int j)intclusterPeersLength()ClusterPeerConfig.VectorclusterPeersVector()ClusterPeerConfig.VectorclusterPeersVector(ClusterPeerConfig.Vector obj)static 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 SyncServerOptionsgetRootAsSyncServerOptions(java.nio.ByteBuffer _bb)static SyncServerOptionsgetRootAsSyncServerOptions(java.nio.ByteBuffer _bb, SyncServerOptions obj)longhistorySizeMaxKb()Once the maximum size is reached, old TX logs are deleted to stay below this limit.longhistorySizeTargetKb()Once the maximum size (historySizeMaxKb) is reached, old TX logs are deleted until this size target is reached (lower than the maximum size).JwtConfigjwtConfig()Optional configuration for JWT (JSON Web Token) authentication.JwtConfigjwtConfig(JwtConfig obj)longrequiredCredentials(int j)Credential types that are required for clients logging in.java.nio.ByteBufferrequiredCredentialsAsByteBuffer()java.nio.ByteBufferrequiredCredentialsInByteBuffer(java.nio.ByteBuffer _bb)intrequiredCredentialsLength()IntVectorrequiredCredentialsVector()IntVectorrequiredCredentialsVector(IntVector obj)static voidstartAuthenticationMethodsVector(FlatBufferBuilder builder, int numElems)static voidstartClusterPeersVector(FlatBufferBuilder builder, int numElems)static voidstartRequiredCredentialsVector(FlatBufferBuilder builder, int numElems)static voidstartSyncServerOptions(FlatBufferBuilder builder)longsyncFlags()Bit flags to configure the Sync Server that are also shared with Sync clients.longsyncServerFlags()Bit flags to configure the Sync Server.java.lang.Stringurl()URL of this Sync Server on which the Sync protocol is exposed (where the server "binds" to).java.nio.ByteBufferurlAsByteBuffer()java.nio.ByteBufferurlInByteBuffer(java.nio.ByteBuffer _bb)static voidValidateVersion()longworkerThreads()By 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
-
-
-
-
Method Detail
-
ValidateVersion
public static void ValidateVersion()
-
getRootAsSyncServerOptions
public static SyncServerOptions getRootAsSyncServerOptions(java.nio.ByteBuffer _bb)
-
getRootAsSyncServerOptions
public static SyncServerOptions getRootAsSyncServerOptions(java.nio.ByteBuffer _bb, SyncServerOptions obj)
-
__init
public void __init(int _i, java.nio.ByteBuffer _bb)
-
__assign
public SyncServerOptions __assign(int _i, java.nio.ByteBuffer _bb)
-
url
public java.lang.String 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
public java.nio.ByteBuffer urlAsByteBuffer()
-
urlInByteBuffer
public java.nio.ByteBuffer urlInByteBuffer(java.nio.ByteBuffer _bb)
-
authenticationMethods
public Credentials authenticationMethods(int j)
A list of enabled authentication methods available to Sync Clients to login.
-
authenticationMethods
public Credentials authenticationMethods(Credentials obj, int j)
-
authenticationMethodsLength
public int authenticationMethodsLength()
-
authenticationMethodsVector
public Credentials.Vector authenticationMethodsVector()
-
authenticationMethodsVector
public Credentials.Vector authenticationMethodsVector(Credentials.Vector obj)
-
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
public java.lang.String 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
public java.nio.ByteBuffer certificatePathAsByteBuffer()
-
certificatePathInByteBuffer
public java.nio.ByteBuffer certificatePathInByteBuffer(java.nio.ByteBuffer _bb)
-
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
public java.lang.String 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
public java.nio.ByteBuffer adminUrlAsByteBuffer()
-
adminUrlInByteBuffer
public java.nio.ByteBuffer adminUrlInByteBuffer(java.nio.ByteBuffer _bb)
-
adminThreads
public long adminThreads()
Number of worker threads used by the Admin web server.
-
clusterId
public java.lang.String 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
public java.nio.ByteBuffer clusterIdAsByteBuffer()
-
clusterIdInByteBuffer
public java.nio.ByteBuffer clusterIdInByteBuffer(java.nio.ByteBuffer _bb)
-
clusterPeers
public ClusterPeerConfig clusterPeers(int j)
List of other (remote) cluster peers to connect to.
-
clusterPeers
public ClusterPeerConfig clusterPeers(ClusterPeerConfig obj, int j)
-
clusterPeersLength
public int clusterPeersLength()
-
clusterPeersVector
public ClusterPeerConfig.Vector clusterPeersVector()
-
clusterPeersVector
public ClusterPeerConfig.Vector clusterPeersVector(ClusterPeerConfig.Vector obj)
-
clusterFlags
public long clusterFlags()
Bit flags to configure the cluster behavior of this sync server (aka cluster peer).
-
jwtConfig
public JwtConfig jwtConfig()
Optional configuration for JWT (JSON Web Token) authentication.
-
requiredCredentials
public long requiredCredentials(int j)
Credential types that are required for clients logging in.
-
requiredCredentialsLength
public int requiredCredentialsLength()
-
requiredCredentialsVector
public IntVector requiredCredentialsVector()
-
requiredCredentialsAsByteBuffer
public java.nio.ByteBuffer requiredCredentialsAsByteBuffer()
-
requiredCredentialsInByteBuffer
public java.nio.ByteBuffer requiredCredentialsInByteBuffer(java.nio.ByteBuffer _bb)
-
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
public static void startSyncServerOptions(FlatBufferBuilder builder)
-
addUrl
public static void addUrl(FlatBufferBuilder builder, int urlOffset)
-
addAuthenticationMethods
public static void addAuthenticationMethods(FlatBufferBuilder builder, int authenticationMethodsOffset)
-
createAuthenticationMethodsVector
public static int createAuthenticationMethodsVector(FlatBufferBuilder builder, int[] data)
-
startAuthenticationMethodsVector
public static void startAuthenticationMethodsVector(FlatBufferBuilder builder, int numElems)
-
addSyncFlags
public static void addSyncFlags(FlatBufferBuilder builder, long syncFlags)
-
addSyncServerFlags
public static void addSyncServerFlags(FlatBufferBuilder builder, long syncServerFlags)
-
addCertificatePath
public static void addCertificatePath(FlatBufferBuilder builder, int certificatePathOffset)
-
addWorkerThreads
public static void addWorkerThreads(FlatBufferBuilder builder, long workerThreads)
-
addHistorySizeMaxKb
public static void addHistorySizeMaxKb(FlatBufferBuilder builder, long historySizeMaxKb)
-
addHistorySizeTargetKb
public static void addHistorySizeTargetKb(FlatBufferBuilder builder, long historySizeTargetKb)
-
addAdminUrl
public static void addAdminUrl(FlatBufferBuilder builder, int adminUrlOffset)
-
addAdminThreads
public static void addAdminThreads(FlatBufferBuilder builder, long adminThreads)
-
addClusterId
public static void addClusterId(FlatBufferBuilder builder, int clusterIdOffset)
-
addClusterPeers
public static void addClusterPeers(FlatBufferBuilder builder, int clusterPeersOffset)
-
createClusterPeersVector
public static int createClusterPeersVector(FlatBufferBuilder builder, int[] data)
-
startClusterPeersVector
public static void startClusterPeersVector(FlatBufferBuilder builder, int numElems)
-
addClusterFlags
public static void addClusterFlags(FlatBufferBuilder builder, long clusterFlags)
-
addJwtConfig
public static void addJwtConfig(FlatBufferBuilder builder, int jwtConfigOffset)
-
addRequiredCredentials
public static void addRequiredCredentials(FlatBufferBuilder builder, int requiredCredentialsOffset)
-
createRequiredCredentialsVector
public static int createRequiredCredentialsVector(FlatBufferBuilder builder, long[] data)
-
startRequiredCredentialsVector
public static void startRequiredCredentialsVector(FlatBufferBuilder builder, int numElems)
-
endSyncServerOptions
public static int endSyncServerOptions(FlatBufferBuilder builder)
-
finishSyncServerOptionsBuffer
public static void finishSyncServerOptionsBuffer(FlatBufferBuilder builder, int offset)
-
finishSizePrefixedSyncServerOptionsBuffer
public static void finishSizePrefixedSyncServerOptionsBuffer(FlatBufferBuilder builder, int offset)
-
-