Class RemoteStorage

java.lang.Object
com.codingchili.core.configuration.system.RemoteStorage

public class RemoteStorage extends Object
configuration settings for a remote storage.
  • Constructor Details

    • RemoteStorage

      public RemoteStorage(String host, int port, String database)
      Parameters:
      host - the hostname of the remote storage
      port - the port of the remote storage
      database - the database identifier of the remote storage.
    • RemoteStorage

      public RemoteStorage()
  • Method Details

    • isPersisted

      public boolean isPersisted()
      Returns:
      true if the contents of the database is persisted to disk. does not apply to storages that are persisted to disk by default. May not be supported.
    • setPersisted

      public RemoteStorage setPersisted(boolean persisted)
      Parameters:
      persisted - indicates that the contents of volatile storages should be flushed to disk in some manner. Does not apply to storages that store their content on disk. May not be supported.
      Returns:
      fluent
    • getDatabase

      public String getDatabase()
      Returns:
      the database identifier of the remote configuration.
    • setDatabase

      public RemoteStorage setDatabase(String database)
      Parameters:
      database - sets the database identifier of the remote storage.
      Returns:
      fluent
    • getHost

      public String getHost()
      Returns:
      Returns the hostname of the remote storage.
    • setHost

      public RemoteStorage setHost(String host)
      Parameters:
      host - sets the hostname of the remote storage.
      Returns:
      fluent
    • getPort

      public Integer getPort()
      Returns:
      the port number of the remote storage.
    • setPort

      public RemoteStorage setPort(Integer port)
      Parameters:
      port - sets the port number of the remote storage.
      Returns:
      fluent
    • getPersistInterval

      public int getPersistInterval()
      Returns:
      the interval in MS which a database should be persisted for non-disk storages. Only applies if persist is set. May not be supported.
    • setPersistInterval

      public RemoteStorage setPersistInterval(int persistInterval)
      Parameters:
      persistInterval - sets the interval in ms which a database should be persisted for non-disk storages. Only applies if persist is set. May not be supported.
      Returns:
      fluent.
    • isSecure

      public boolean isSecure()
      Returns:
      true if the storage plugin should attempt to use a secure connection. If the plugin supports security and fails to enable it an error must be thrown and storage initialization fail.
    • setSecure

      public void setSecure(boolean secure)
      Parameters:
      secure - indicates that this storage must be loaded with a secure connection.
    • getProperties

      public io.vertx.core.json.JsonObject getProperties()
      Returns:
      extra configuration properties used to customize the database.
    • setProperties

      public void setProperties(io.vertx.core.json.JsonObject properties)
      Parameters:
      properties - extra configuration properties used to customize the database.