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.
  • Constructor Details

    • SyncServerOptions

      public SyncServerOptions()
  • Method Details

    • ValidateVersion

      public static void ValidateVersion()
    • getRootAsSyncServerOptions

      public static SyncServerOptions getRootAsSyncServerOptions(ByteBuffer _bb)
    • getRootAsSyncServerOptions

      public static SyncServerOptions getRootAsSyncServerOptions(ByteBuffer _bb, SyncServerOptions obj)
    • __init

      public void __init(int _i, ByteBuffer _bb)
    • __assign

      public SyncServerOptions __assign(int _i, ByteBuffer _bb)
    • url

      public 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 ByteBuffer urlAsByteBuffer()
    • urlInByteBuffer

      public ByteBuffer urlInByteBuffer(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 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 ByteBuffer certificatePathAsByteBuffer()
    • certificatePathInByteBuffer

      public ByteBuffer certificatePathInByteBuffer(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 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 ByteBuffer adminUrlAsByteBuffer()
    • adminUrlInByteBuffer

      public ByteBuffer adminUrlInByteBuffer(ByteBuffer _bb)
    • adminThreads

      public long adminThreads()
      Number of worker threads used by the Admin web server.
    • clusterId

      public 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 ByteBuffer clusterIdAsByteBuffer()
    • clusterIdInByteBuffer

      public ByteBuffer clusterIdInByteBuffer(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.
    • jwtConfig

      public JwtConfig jwtConfig(JwtConfig obj)
    • requiredCredentials

      public long requiredCredentials(int j)
      Credential types that are required for clients logging in.
    • requiredCredentialsLength

      public int requiredCredentialsLength()
    • requiredCredentialsVector

      public IntVector requiredCredentialsVector()
    • requiredCredentialsVector

      public IntVector requiredCredentialsVector(IntVector obj)
    • requiredCredentialsAsByteBuffer

      public ByteBuffer requiredCredentialsAsByteBuffer()
    • requiredCredentialsInByteBuffer

      public ByteBuffer requiredCredentialsInByteBuffer(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)