Class SyncServerOptions


  • public final class SyncServerOptions
    extends io.objectbox.flatbuffers.Table
    The Sync server configuration used to configure a starting Sync Server.
    • Constructor Detail

      • SyncServerOptions

        public SyncServerOptions()
    • Method Detail

      • ValidateVersion

        public static void ValidateVersion()
      • getRootAsSyncServerOptions

        public static SyncServerOptions getRootAsSyncServerOptions​(java.nio.ByteBuffer _bb)
      • __init

        public void __init​(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.
      • authenticationMethodsLength

        public int authenticationMethodsLength()
      • 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.
      • clusterPeersLength

        public int clusterPeersLength()
      • 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)