com.kjetland.ddsl

DdslClientOnlyFallbackImpl

class DdslClientOnlyFallbackImpl extends DdslClient

Since we migt have a situation where our ddsl / zookeeper solution is broken or down we have to have a solution where we can override it.

This FallbackClient gets a path from sys env, then tries to load that property file. then tries to look up the requested sid from this file. if success, this url is returned.

It's critical that this FallbackClient impl logs a lot about what it is looking for (and possible using).

This makes it possible, in an error situation, to look at the client logfile and see what to do, to update the fallback info to make(hack) the system to work again...

Linear Supertypes
DdslClient, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DdslClientOnlyFallbackImpl
  2. DdslClient
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DdslClientOnlyFallbackImpl(ddslConfig: DdslConfig)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def disconnect(): Unit

    Call this method to disconnect yhe client from DDSL.

    Call this method to disconnect yhe client from DDSL. When you do this All services added by serviceUp() will be removed from DDSL. This also happens if your program quits.

    If you undeploy your app or quit gracefully, it is best practice to call disconnect

    Definition Classes
    DdslClientOnlyFallbackImplDdslClient
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def getAllAvailableServices(): Array[ServiceWithLocations]

    Returns list of all services pressent in the ddsl-network

    Returns list of all services pressent in the ddsl-network

    Definition Classes
    DdslClientOnlyFallbackImplDdslClient
  13. def getBestServiceLocation(sr: ServiceRequest): ServiceLocation

    This method return just one locatiion for the service beeing asked for.

    This method return just one locatiion for the service beeing asked for. It return the one best locations. The best location is the first element in the list returned from the method getServiceLocations.

    Have a look at the documentation for getServiceLocations() to get more info.

    If available locations is found, an NoDDSLServiceLocationFoundException is thrown

    Definition Classes
    DdslClient
    Annotations
    @throws( ... )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def getServiceLocations(sr: ServiceRequest): Array[ServiceLocation]

    Clients would probably use the method getBestServiceLocation() instead of this one.

    Clients would probably use the method getBestServiceLocation() instead of this one.

    Returns the list of all available locations where the service being asked for can be found just now. The returned list is sorted, with the best location for your client first.. The list is sorted by quality. Locations with equal quality is randomized - so you would automatically get distributed load if you have several instances of your service running at the same time. Services running on the same host as the asking client will be preferred.

    If available locations is found, an NoDDSLServiceLocationFoundException is thrown

    Definition Classes
    DdslClientOnlyFallbackImplDdslClient
    Annotations
    @throws( ... )
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def serviceDown(s: Service): Boolean

    You can use this method to remove your service from DDSL.

    You can use this method to remove your service from DDSL. This will automatically happen if you use disconnect ot just quit your app.

    Definition Classes
    DdslClientOnlyFallbackImplDdslClient
  22. def serviceUp(s: Service, persistent: Boolean): Boolean

    Tells DDSL that your service is up.

    Tells DDSL that your service is up.. If persistent == false, it will stay as UP forever or until you call serviceDown, disconnect, or until your app quit. If persistent == true, it will stay up even after your app quits.

    Returns true if success

    Definition Classes
    DdslClientOnlyFallbackImplDdslClient
  23. def serviceUp(s: Service): Boolean

    Tells DDSL that your service is up.

    Tells DDSL that your service is up.. It will stay as UP forever or until you call serviceDown, disconnect, or until your app quit

    Returns true if success

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

    Definition Classes
    AnyRef
  25. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from DdslClient

Inherited from AnyRef

Inherited from Any

Ungrouped