TimeSeriesBuffer

com.netflix.atlas.core.db.TimeSeriesBuffer
See theTimeSeriesBuffer companion object
final class TimeSeriesBuffer(val tags: Map[String, String], val data: ArrayTimeSeq) extends TimeSeries, TimeSeq, LazyTaggedItem

Mutable buffer for efficiently manipulating metric data.

Attributes

Companion
object
Graph
Supertypes
trait TimeSeq
trait TimeSeries
trait TaggedItem
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def add(ts: TimeSeriesBuffer): Unit

Add the corresponding positions of the two buffers. The buffers must have the same settings.

Add the corresponding positions of the two buffers. The buffers must have the same settings.

Attributes

def add(block: Block): Int
def add(v: Double): Unit

Add a constant value to all positions of this buffer.

Add a constant value to all positions of this buffer.

Attributes

def apply(t: Long): Double
def canEqual(other: Any): Boolean

Returns a new buffer with values consolidated to a larger step size.

Returns a new buffer with values consolidated to a larger step size.

Attributes

Create a deep copy of this buffer.

Create a deep copy of this buffer.

Attributes

def count(ts: TimeSeriesBuffer): Unit

Updates each position by 1 if the corresponding position in the other buffer is a valid number, i.e., is not equal NaN. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Updates each position by 1 if the corresponding position in the other buffer is a valid number, i.e., is not equal NaN. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Attributes

def count(block: Block): Int
def divide(ts: TimeSeriesBuffer): Unit

Divide the corresponding positions of the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Divide the corresponding positions of the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Attributes

def divide(v: Double): Unit

Divide a constant value to all positions of this buffer.

Divide a constant value to all positions of this buffer.

Attributes

def dsType: DsType
override def equals(other: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Any
def getValue(timestamp: Long): Double
override def hashCode: Int

Calculates a hash code value for the object.

Calculates a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Definition Classes
Any
def initCount(): Unit

Setup this buffer array as a count.

Setup this buffer array as a count.

Attributes

def isAllNaN: Boolean

Returns true if the buffer is all NaN values.

Returns true if the buffer is all NaN values.

Attributes

def label: String
def max(ts: TimeSeriesBuffer): Unit

Updates each position we the max value between the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Updates each position we the max value between the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Attributes

def max(block: Block): Int
def merge(ts: TimeSeriesBuffer): Unit

Merge with another metric buffer.

Merge with another metric buffer.

Attributes

def min(ts: TimeSeriesBuffer): Unit

Updates each position we the min value between the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Updates each position we the min value between the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Attributes

def min(block: Block): Int
def multiply(ts: TimeSeriesBuffer): Unit

Multiply the corresponding positions of the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Multiply the corresponding positions of the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Attributes

def multiply(v: Double): Unit

Multiply a constant value to all positions of this buffer.

Multiply a constant value to all positions of this buffer.

Attributes

def normalize(step: Long, start: Long, size: Int): TimeSeriesBuffer

Returns a new buffer normalized to the specified settings.

Returns a new buffer normalized to the specified settings.

Attributes

def start: Long
def step: Long

Attributes

def subtract(ts: TimeSeriesBuffer): Unit

Subtract the corresponding positions of the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Subtract the corresponding positions of the two buffers. The buffers must have the same settings. The tags for the new buffer will be the intersection.

Attributes

def subtract(v: Double): Unit

Subtract a constant value to all positions of this buffer.

Subtract a constant value to all positions of this buffer.

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def unConsolidate(s: Long, e: Long, step: Long): TimeSeriesBuffer

Returns a new buffer with values un-consolidated to a smaller step size.

Returns a new buffer with values un-consolidated to a smaller step size.

Attributes

def values: Array[Double]

Inherited methods

def binaryOp(ts: TimeSeries, labelFmt: String, f: BinaryOp): TimeSeries

Attributes

Inherited from:
TimeSeries

Attributes

Inherited from:
TimeSeries
def bounded(s: Long, e: Long): ArrayTimeSeq

Attributes

Inherited from:
TimeSeq

Attributes

Inherited from:
TimeSeries
def datapoint(timestamp: Long): Datapoint

Attributes

Inherited from:
TimeSeries
def foreach(f: (String, String) => Unit): Unit

Code that just needs to iterate over all tags should use this method. Allows for implementations to optimize how the tag data is stored and traversed.

Code that just needs to iterate over all tags should use this method. Allows for implementations to optimize how the tag data is stored and traversed.

Attributes

Inherited from:
TaggedItem
def foreach(s: Long, e: Long)(f: (Long, Double) => Unit): Unit

Fast loop with no intermediate object creation.

Fast loop with no intermediate object creation.

Attributes

Inherited from:
TimeSeq
def idString: String

Standard string representation of the id.

Standard string representation of the id.

Attributes

Inherited from:
TaggedItem
def isExpired: Boolean

Returns true if the item is expired and no data is available.

Returns true if the item is expired and no data is available.

Attributes

Inherited from:
TaggedItem

Attributes

Inherited from:
TimeSeries
def mapValues(f: Double => Double): TimeSeq

Attributes

Inherited from:
TimeSeq
def offset(dur: Long): TimeSeries

Attributes

Inherited from:
TimeSeries
def unaryOp(labelFmt: String, f: Double => Double): TimeSeries

Attributes

Inherited from:
TimeSeries
def withLabel(s: String): TimeSeries

Attributes

Inherited from:
TimeSeries
def withTags(ts: Map[String, String]): TimeSeries

Attributes

Inherited from:
TimeSeries

Concrete fields

val tags: Map[String, String]

The tags associated with this item.

The tags associated with this item.

Attributes

Inherited fields

lazy val id: ItemId

Unique id based on the tags.

Unique id based on the tags.

Attributes

Inherited from:
LazyTaggedItem