Package io.objectbox.sync.server
Class SyncServerOptions
- java.lang.Object
-
- io.objectbox.flatbuffers.Table
-
- io.objectbox.sync.server.SyncServerOptions
-
public final class SyncServerOptions extends io.objectbox.flatbuffers.Table
The Sync server configuration used to configure a starting Sync Server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SyncServerOptions.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 void
addAdminThreads(io.objectbox.flatbuffers.FlatBufferBuilder builder, long adminThreads)
static void
addAdminUrl(io.objectbox.flatbuffers.FlatBufferBuilder builder, int adminUrlOffset)
static void
addAuthenticationMethods(io.objectbox.flatbuffers.FlatBufferBuilder builder, int authenticationMethodsOffset)
static void
addCertificatePath(io.objectbox.flatbuffers.FlatBufferBuilder builder, int certificatePathOffset)
static void
addClusterFlags(io.objectbox.flatbuffers.FlatBufferBuilder builder, long clusterFlags)
static void
addClusterId(io.objectbox.flatbuffers.FlatBufferBuilder builder, int clusterIdOffset)
static void
addClusterPeers(io.objectbox.flatbuffers.FlatBufferBuilder builder, int clusterPeersOffset)
static void
addHistorySizeMaxKb(io.objectbox.flatbuffers.FlatBufferBuilder builder, long historySizeMaxKb)
static void
addHistorySizeTargetKb(io.objectbox.flatbuffers.FlatBufferBuilder builder, long historySizeTargetKb)
static void
addSyncFlags(io.objectbox.flatbuffers.FlatBufferBuilder builder, long syncFlags)
static void
addSyncServerFlags(io.objectbox.flatbuffers.FlatBufferBuilder builder, long syncServerFlags)
static void
addUrl(io.objectbox.flatbuffers.FlatBufferBuilder builder, int urlOffset)
static void
addWorkerThreads(io.objectbox.flatbuffers.FlatBufferBuilder builder, long workerThreads)
long
adminThreads()
Number of worker threads used by the Admin web server.java.lang.String
adminUrl()
URL of the Admin (web server) to bind to.java.nio.ByteBuffer
adminUrlAsByteBuffer()
java.nio.ByteBuffer
adminUrlInByteBuffer(java.nio.ByteBuffer _bb)
Credentials
authenticationMethods(int j)
A list of enabled authentication methods available to Sync Clients to login.Credentials
authenticationMethods(Credentials obj, int j)
int
authenticationMethodsLength()
Credentials.Vector
authenticationMethodsVector()
Credentials.Vector
authenticationMethodsVector(Credentials.Vector obj)
java.lang.String
certificatePath()
The SSL certificate directory; SSL will be enabled if not empty.java.nio.ByteBuffer
certificatePathAsByteBuffer()
java.nio.ByteBuffer
certificatePathInByteBuffer(java.nio.ByteBuffer _bb)
long
clusterFlags()
Bit flags to configure the cluster behavior of this sync server (aka cluster peer).java.lang.String
clusterId()
Enables cluster mode (requires the Cluster feature) and associates this cluster peer with the given ID.java.nio.ByteBuffer
clusterIdAsByteBuffer()
java.nio.ByteBuffer
clusterIdInByteBuffer(java.nio.ByteBuffer _bb)
ClusterPeerConfig
clusterPeers(int j)
List of other (remote) cluster peers to connect to.ClusterPeerConfig
clusterPeers(ClusterPeerConfig obj, int j)
int
clusterPeersLength()
ClusterPeerConfig.Vector
clusterPeersVector()
ClusterPeerConfig.Vector
clusterPeersVector(ClusterPeerConfig.Vector obj)
static int
createAuthenticationMethodsVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int[] data)
static int
createClusterPeersVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int[] data)
static int
createSyncServerOptions(io.objectbox.flatbuffers.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)
static int
endSyncServerOptions(io.objectbox.flatbuffers.FlatBufferBuilder builder)
static void
finishSizePrefixedSyncServerOptionsBuffer(io.objectbox.flatbuffers.FlatBufferBuilder builder, int offset)
static void
finishSyncServerOptionsBuffer(io.objectbox.flatbuffers.FlatBufferBuilder builder, int offset)
static SyncServerOptions
getRootAsSyncServerOptions(java.nio.ByteBuffer _bb)
static SyncServerOptions
getRootAsSyncServerOptions(java.nio.ByteBuffer _bb, SyncServerOptions obj)
long
historySizeMaxKb()
Once the maximum size is reached, old TX logs are deleted to stay below this limit.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).static void
startAuthenticationMethodsVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int numElems)
static void
startClusterPeersVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int numElems)
static void
startSyncServerOptions(io.objectbox.flatbuffers.FlatBufferBuilder builder)
long
syncFlags()
Bit flags to configure the Sync Server that are also shared with Sync clients.long
syncServerFlags()
Bit flags to configure the Sync Server.java.lang.String
url()
URL of this Sync Server on which the Sync protocol is exposed (where the server "binds" to).java.nio.ByteBuffer
urlAsByteBuffer()
java.nio.ByteBuffer
urlInByteBuffer(java.nio.ByteBuffer _bb)
static void
ValidateVersion()
long
workerThreads()
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).
-
createSyncServerOptions
public static int createSyncServerOptions(io.objectbox.flatbuffers.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)
-
startSyncServerOptions
public static void startSyncServerOptions(io.objectbox.flatbuffers.FlatBufferBuilder builder)
-
addUrl
public static void addUrl(io.objectbox.flatbuffers.FlatBufferBuilder builder, int urlOffset)
-
addAuthenticationMethods
public static void addAuthenticationMethods(io.objectbox.flatbuffers.FlatBufferBuilder builder, int authenticationMethodsOffset)
-
createAuthenticationMethodsVector
public static int createAuthenticationMethodsVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int[] data)
-
startAuthenticationMethodsVector
public static void startAuthenticationMethodsVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int numElems)
-
addSyncFlags
public static void addSyncFlags(io.objectbox.flatbuffers.FlatBufferBuilder builder, long syncFlags)
-
addSyncServerFlags
public static void addSyncServerFlags(io.objectbox.flatbuffers.FlatBufferBuilder builder, long syncServerFlags)
-
addCertificatePath
public static void addCertificatePath(io.objectbox.flatbuffers.FlatBufferBuilder builder, int certificatePathOffset)
-
addWorkerThreads
public static void addWorkerThreads(io.objectbox.flatbuffers.FlatBufferBuilder builder, long workerThreads)
-
addHistorySizeMaxKb
public static void addHistorySizeMaxKb(io.objectbox.flatbuffers.FlatBufferBuilder builder, long historySizeMaxKb)
-
addHistorySizeTargetKb
public static void addHistorySizeTargetKb(io.objectbox.flatbuffers.FlatBufferBuilder builder, long historySizeTargetKb)
-
addAdminUrl
public static void addAdminUrl(io.objectbox.flatbuffers.FlatBufferBuilder builder, int adminUrlOffset)
-
addAdminThreads
public static void addAdminThreads(io.objectbox.flatbuffers.FlatBufferBuilder builder, long adminThreads)
-
addClusterId
public static void addClusterId(io.objectbox.flatbuffers.FlatBufferBuilder builder, int clusterIdOffset)
-
addClusterPeers
public static void addClusterPeers(io.objectbox.flatbuffers.FlatBufferBuilder builder, int clusterPeersOffset)
-
createClusterPeersVector
public static int createClusterPeersVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int[] data)
-
startClusterPeersVector
public static void startClusterPeersVector(io.objectbox.flatbuffers.FlatBufferBuilder builder, int numElems)
-
addClusterFlags
public static void addClusterFlags(io.objectbox.flatbuffers.FlatBufferBuilder builder, long clusterFlags)
-
endSyncServerOptions
public static int endSyncServerOptions(io.objectbox.flatbuffers.FlatBufferBuilder builder)
-
finishSyncServerOptionsBuffer
public static void finishSyncServerOptionsBuffer(io.objectbox.flatbuffers.FlatBufferBuilder builder, int offset)
-
finishSizePrefixedSyncServerOptionsBuffer
public static void finishSizePrefixedSyncServerOptionsBuffer(io.objectbox.flatbuffers.FlatBufferBuilder builder, int offset)
-
-