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
- Alphabetic
- By Inheritance
- MDataClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asProperties(): Properties
asProperties
method returns the instance metadata in the form of java Properties instanceasProperties
method returns the instance metadata in the form of java Properties instancescala> mdataClient.asProperties() res14: java.util.Properties = {lifecycle=devl, component=abc}
- returns
a java.util.Properties instance
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
delete(key: String): Boolean
delete
method calls mdata-delete binary as child process and returns the output as a booleandelete
method calls mdata-delete binary as child process and returns the output as a booleanscala> 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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(key: String): Option[String]
get
method calls mdata-get binary as child process and returns the output as an optional stringget
method calls mdata-get binary as child process and returns the output as an optional stringscala> 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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
listKeys(): List[String]
listKeys
method calls mdata-list binary as child process and returns the output as list of stringlistKeys
method calls mdata-list binary as child process and returns the output as list of stringscala> 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
-
def
loadToSystemProperties(): Unit
loadToSystemProperties
method loads the instance metadata as JVM System PropertiesloadToSystemProperties
method loads the instance metadata as JVM System Propertiesscala> mdataClient.loadToSystemProperties() scala> System.getProperty("lifecycle") res16: String = devl
- returns
an Unit
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
put(key: String, value: String): Boolean
put
method calls mdata-put binary as child process and returns the output as a booleanput
method calls mdata-put binary as child process and returns the output as a booleanscala> 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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
This is the documentation for the Joyent Triton MData Client for Scala.
Driver structure
The Joyent Triton mdata-client for Scala.
Notable packages include: