Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath.
Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath.
You should pass in a function which will take the ColumnMutation to an Execution[Void]. E.g.,
// `null` here is the ttl (cfUsers \ username \ "age").execute {_.putValue(3, null)}
The Execution[Void] will then be run.
Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath asynchronously.
Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath asynchronously.
You should pass in a function which will take the ColumnMutation to an Execution[Void]. E.g.,
// `null` here is the ttl (cfUsers \ username \ "age").executeAsync {_.putValue(3, null)}
The Execution[Void] will then be run asynchronously resulting in a java.util.concurrent.Future.
Optionally returns a com.netflix.astyanax.model.Column if it exists at this ColumnPath.
Return the value at this ColumnPath or a default if no column exists in Cassandra.
Return the value at this ColumnPath or a default if no column exists in Cassandra.
The column could exist and have an empty value. If you need to check for that use
// Assuming the value is a String. colPath.get.flatMap{c => if (c.hasValue) Some(c.getStringValue) else None}.getOrElse(default)
Optionally returns a com.netflix.astyanax.model.Column if it exists at this ColumnPath.
Optionally returns a com.netflix.astyanax.model.Column if it exists at this ColumnPath.
Note that the colname
and serializer type products must agree. E.g., both (String, String)
or both (String, Int, String).
Cassandra Column Path
A ColumnPath represents the full path to a given column. Any ColumnPath (or substructure) can use
get
to optionally fetch the column (although recent changes mean that to get a Composite Column you need to use RowPath to do so). Additionallyexecute
andexecuteAsync
expose the Astyanax operations available on a com.netflix.astyanax.ColumnMutation.Operations
The
get
operation returns the column if it exists. UsegetWith
to name the serializer for composite columns.The
execute
andexecuteAsync
operations allow for modifying the Column found at this ColumnPath.A ColumnPath can be used to construct a Column.