Packages

t

csw.location.api.javadsl

ILocationService

trait ILocationService extends AnyRef

A LocationService interface to manage connections and their registrations. All operations are non-blocking.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ILocationService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def asScala: LocationService

    Returns the Scala API for this instance of location service

  2. abstract def find[L <: Location](connection: TypedConnection[L]): CompletableFuture[Optional[L]]

    Resolve the location for a connection from the local cache

    Resolve the location for a connection from the local cache

    connection

    a connection to resolve to with its registered location

    returns

    a CompletableFuture which completes with the resolved location if found or Empty otherwise. It can fail with csw.location.api.exceptions.RegistrationListingFailed.

  3. abstract def list(connectionType: ConnectionType): CompletableFuture[List[Location]]

    Filters all locations registered based on a connection type

    Filters all locations registered based on a connection type

    connectionType

    list components of this connectionType

    returns

    a CompletableFuture which completes with filtered locations or can fail with csw.location.api.exceptions.RegistrationListingFailed

  4. abstract def list(hostname: String): CompletableFuture[List[Location]]

    Filters all locations registered based on a hostname

    Filters all locations registered based on a hostname

    hostname

    list components running on this hostname

    returns

    a CompletableFuture which completes with filtered locations or can fail with csw.location.api.exceptions.RegistrationListingFailed

  5. abstract def list(componentType: ComponentType): CompletableFuture[List[Location]]

    Filters all locations registered based on a component type

    Filters all locations registered based on a component type

    componentType

    list components of this componentType

    returns

    a CompletableFuture which completes with filtered locations or can fail with csw.location.api.exceptions.RegistrationListingFailed

  6. abstract def list: CompletableFuture[List[Location]]

    Lists all locations registered

    Lists all locations registered

    returns

    a CompletableFuture which completes with a List of all registered locations or can fail with csw.location.api.exceptions.RegistrationListingFailed

  7. abstract def listByPrefix(prefix: String): CompletableFuture[List[Location]]

    Filters all locations registered based on a prefix.

    Filters all locations registered based on a prefix.

    Note that all locations having subsystem prefix that starts with the given prefix value will be listed

    prefix

    list components by this prefix

    returns

    a CompletableFuture which completes with filtered locations or can fail with csw.location.api.exceptions.RegistrationListingFailed

  8. abstract def register(registration: Registration): CompletableFuture[IRegistrationResult]

    Registers a connection to location

    Registers a connection to location

    registration

    the Registration holding connection and it's corresponding location to register with LocationService

    returns

    a CompletableFuture which completes with Registration result or can fail with csw.location.api.exceptions.RegistrationFailed or csw.location.api.exceptions.OtherLocationIsRegistered

  9. abstract def resolve[L <: Location](connection: TypedConnection[L], within: Duration): CompletableFuture[Optional[L]]

    Resolves the location based on the given connection

    Resolves the location based on the given connection

    L

    the concrete Location type returned once the connection is resolved

    connection

    a connection to resolve to with its registered location

    within

    the time for which a connection is looked-up within LocationService

    returns

    a CompletableFuture which completes with the resolved location if found or None otherwise. It can fail with csw.location.api.exceptions.RegistrationListingFailed.

  10. abstract def subscribe(connection: Connection, consumer: Consumer[TrackingEvent]): Subscription

    Subscribe to tracking events for a connection by providing a consumer For each event accept method of consumer interface is invoked.

    Subscribe to tracking events for a connection by providing a consumer For each event accept method of consumer interface is invoked. Use this method if you do not want to handle materialization and happy with a side-effecting callback instead

    Note that callbacks are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

    connection

    the connection that is to be tracked

    consumer

    the Consumer function that consumes TrakingEvent

    returns

    a killswitch which can be shutdown to unsubscribe the consumer

  11. abstract def track(connection: Connection): Source[TrackingEvent, Subscription]

    Tracks the connection and send events for modification or removal of its location

    Tracks the connection and send events for modification or removal of its location

    connection

    the connection that is to be tracked

    returns

    A stream that emits events related to the connection. It can be cancelled using KillSwitch. This will stop giving events for earlier tracked connection

  12. abstract def unregister(connection: Connection): CompletableFuture[Done]

    Unregisters the connection

    Unregisters the connection

    Note that this method is idempotent, which means multiple calls to unregister the same connection will be no-op once successfully unregistered from location service

    connection

    an already registered connection

    returns

    a CompletableFuture which completes after un-registration happens successfully and fails otherwise with csw.location.api.exceptions.UnregistrationFailed

  13. abstract def unregisterAll(): CompletableFuture[Done]

    Unregisters all connections registered

    Unregisters all connections registered

    Note that it is highly recommended to use this method for testing purpose only

    returns

    a CompletableFuture which completes after all connections are unregistered successfully or fails otherwise with csw.location.api.exceptions.RegistrationListingFailed

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped