Trait

com.websudos.util.zookeeper

DefaultZkConf

Related Doc: package zookeeper

Permalink

trait DefaultZkConf extends ZooKeeperConf

Linear Supertypes
ZooKeeperConf, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DefaultZkConf
  2. ZooKeeperConf
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add(path: String, address: InetSocketAddress): Future[Option[SetDataResponse]]

    Permalink

    This has the effect of pushing a new InetSocketAddress or its string representation to be price to the set already in ZooKeeper.

    This has the effect of pushing a new InetSocketAddress or its string representation to be price to the set already in ZooKeeper. A read operation is always performed first to avoid maintaining any state of the client side.

    If the data is not available in the data that was read, a write operation is carried out. If the data is already there, the write operation is skipped to save time and bandwidth a Future is immediately completed.

    path

    The ZooKeeper path to add the address to.

    address

    A Future wrapping an optional operation response. If the address is already in the set no write operation is performed.

    Definition Classes
    ZooKeeperConf
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hosts(path: String): Future[Set[InetSocketAddress]]

    Permalink

    This method is shorthand syntax for retrieving the entire set of host:port pairs available on a ZooKeeper node.

    This method is shorthand syntax for retrieving the entire set of host:port pairs available on a ZooKeeper node. It's used in conjunction with the default parsing convention defined.

    path

    The ZooKeeper path to read from.

    returns

    A set of unique host:port combinations represented as a set of InetSocketAddress objects.

    Definition Classes
    ZooKeeperConf
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def localAddress(port: Int): InetSocketAddress

    Permalink

    This is a simple shorthand method allowing users to get a reference to the hostname of the current machine.

    This is a simple shorthand method allowing users to get a reference to the hostname of the current machine. The purpose of this is to allow shorthand syntax for things like server.add(localAddress(somePort)){code}, effectively allowing applications to register as active and become discoverable via ZooKeeper.

    port

    The port to use in conjunction with the hostname of the current machine.

    returns

    An InetSocketAddress matching the hostname of the current machine and a chosen port.

    Definition Classes
    ZooKeeperConf
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def parse(data: String): Set[InetSocketAddress]

    Permalink

    This method is used to parse the string of data obtained from a ZooKeeper path into a sequence of ports.

    This method is used to parse the string of data obtained from a ZooKeeper path into a sequence of ports. It's highly opinionated about the format in which teh data should be and it will only work with our default.

    Our format is "host:port*".

    data

    The data string fetched from ZooKeeper.

    Definition Classes
    ZooKeeperConf
  19. def register(path: String, data: String): Future[SetDataResponse]

    Permalink

    This is a shorthand method for a UTF-8 based write operation to a ZooKeeper path.

    This is a shorthand method for a UTF-8 based write operation to a ZooKeeper path. It will simply overwrite the existing data on a path with the argument provided.

    The encoding in use by this method is always UTF 8.

    path

    The ZooKeeper path to write to.

    data

    The string of data to write to the ZooKeeper path.

    returns

    A Future wrapping the response of the write operation.

    Attributes
    protected[com.websudos.util.zookeeper]
    Definition Classes
    ZooKeeperConf
  20. def register(path: String, address: Set[InetSocketAddress]): Future[SetDataResponse]

    Permalink

    Registers a new set of addresses on a ZooKeeper node.

    Registers a new set of addresses on a ZooKeeper node. This will overwrite any existing data on the path.

    path

    The ZooKeeper path to write to.

    address

    The InetSocketAddress to save as a sequence.

    returns

    A Future wrapping the response of the write operation.

    Definition Classes
    ZooKeeperConf
  21. def register(path: String, address: InetSocketAddress): Future[SetDataResponse]

    Permalink

    Registers a address on a ZooKeeper node.

    Registers a address on a ZooKeeper node. This will overwrite any existing data on the path.

    path

    The ZooKeeper path to write to.

    address

    The InetSocketAddress to save as a sequence.

    returns

    A Future wrapping the response of the write operation.

    Definition Classes
    ZooKeeperConf
  22. def remove(path: String, address: InetSocketAddress): Future[Option[SetDataResponse]]

    Permalink

    This will remove an address from a ZooKeeper node/path.

    This will remove an address from a ZooKeeper node/path. This is useful when a server is going out of service or any other similar situation.

    A read operation is always carried out no matter what to avoid maintaining any state of the client side. If the address to be removed is not found in the existing set, no write operation will be carried out.

    path

    The ZooKeeper path to write to.

    address

    The InetSocketAddress to remove from the existing set.

    returns

    A Future wrapping an optional operation response. If the address is not in the set no write operation is performed.

    Definition Classes
    ZooKeeperConf
  23. val store: DefaultClientStore.type

    Permalink

    The store synchronising access to the ZooKeeper client.

    The store synchronising access to the ZooKeeper client.

    Definition Classes
    DefaultZkConfZooKeeperConf
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. implicit val timeout: Duration

    Permalink

    The default connection timeout.

    The default connection timeout. This is enforced when the ZooKeeper client connects to the ZooKeeper host.

    Definition Classes
    ZooKeeperConf
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ZooKeeperConf

Inherited from AnyRef

Inherited from Any

Ungrouped