Packages

class MDataClient extends AnyRef

MDataClient class provides methods to interact with instance metadata deployed on Joyent Triton cloud.

See also

mdata-client for information on Joyent Triton mdata-client

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

Instance Constructors

  1. new MDataClient(processLogger: ProcessLogger, binPath: String)

    creates a new MDataClient connector instance

    creates a new MDataClient connector instance

    processLogger

    A log handler to log stdout and stderr events of the processes

    binPath

    A prefix path for the mdata executable binaries, if they are not present in current PATH scope

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 asProperties(): Properties

    asProperties method returns the instance metadata in the form of java Properties instance

    asProperties method returns the instance metadata in the form of java Properties instance

    scala> mdataClient.asProperties()
    
    res14: java.util.Properties = {lifecycle=devl, component=abc}
    returns

    a java.util.Properties instance

  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def delete(key: String): Boolean

    delete method calls mdata-delete binary as child process and returns the output as a boolean

    delete method calls mdata-delete binary as child process and returns the output as a boolean

    scala> mdataClient.delete("version")
    
    res2: Boolean = true
    
    scala> mdataClient.delete("version")
    res3: Boolean = false
    key

    input metadata key

    returns

    a boolean, true for success and false for failure

    See also

    mdata-delete for more information on mdata-delete command

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def get(key: String): Option[String]

    get method calls mdata-get binary as child process and returns the output as an optional string

    get method calls mdata-get binary as child process and returns the output as an optional string

    scala> mdataClient.get("lifecycle")
    
    res1: Option[String] = Some(devl)
    
    scala> mdataClient.get("dummy")
    
    res1: Option[String] = None
    key

    input metadata key

    returns

    an optional string value for the input metadata key

    See also

    mdata-get for more information on mdata-get command

  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def listKeys(): List[String]

    listKeys method calls mdata-list binary as child process and returns the output as list of string

    listKeys method calls mdata-list binary as child process and returns the output as list of string

    scala> mdataClient.listKeys()
    
    res0: List[String] = List(root_authorized_keys, lifecycle, component)
    returns

    a list of instance metadata keys

    See also

    mdata-list for more information on mdata-list command

  16. def loadToSystemProperties(): Unit

    loadToSystemProperties method loads the instance metadata as JVM System Properties

    loadToSystemProperties method loads the instance metadata as JVM System Properties

    scala> mdataClient.loadToSystemProperties()
    scala> System.getProperty("lifecycle")
    
    res16: String = devl
    returns

    an Unit

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def put(key: String, value: String): Boolean

    put method calls mdata-put binary as child process and returns the output as a boolean

    put method calls mdata-put binary as child process and returns the output as a boolean

    scala> mdataClient.put("version", "1.0")
    
    res1: Boolean = true
    
    scala> mdataClient.put("version", "")
    java.lang.IllegalArgumentException: requirement failed: value argument can't be empty!!
      at scala.Predef$.require(Predef.scala:224)
      at com.github.arcizon.triton.MDataClient.put(MDataClient.scala:46)
      ... 32 elided
    key

    input metadata key

    value

    input metadata value for the key

    returns

    a boolean, true for success and false for failure

    See also

    mdata-put for more information on mdata-put command

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped