Package ghidra.trace.database.target

# Class DBTraceObjectValue

java.lang.Object
ghidra.trace.database.target.DBTraceObjectValue

All Implemented Interfaces:
  `TraceObjectValue`

public class DBTraceObjectValue extends Object implements TraceObjectValue

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBTraceObjectValue(DBTraceObjectManager manager, ghidra.trace.database.target.TraceObjectValueStorage wrapped)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `delete()`
  Delete this entry
  `protected KeyPath`
  `doGetCanonicalPath()`
  `protected boolean`
  `doIsCanonical()`
  `protected Stream<? extends TraceObjectValPath>`
  `doStreamVisitor(Lifespan span, TreeTraversal.Visitor visitor)`
  `KeyPath`
  `getCanonicalPath()`
  Get the "canonical path" of this value
  `DBTraceObject`
  `getChild()`
  Get the value as an object
  `String`
  `getEntryKey()`
  Get the key identifying this child to its parent
  `Lifespan`
  `getLifespan()`
  Get the lifespan of this entry
  `long`
  `getMaxSnap()`
  Get the maximum snap of this entry
  `long`
  `getMinSnap()`
  Get the minimum snap of this entry
  `DBTraceObject`
  `getParent()`
  Get the parent object of this entry
  `Trace`
  `getTrace()`
  Get the trace containing this value entry
  `Object`
  `getValue()`
  Get the value
  `ghidra.trace.database.target.TraceObjectValueStorage`
  `getWrapped()`
  `boolean`
  `isCanonical()`
  Check if this value represents its child's canonical location
  `boolean`
  `isDeleted()`
  Check if this value entry has been deleted
  `boolean`
  `isObject()`
  Check if the value is an object (i.e., `TraceObject`)
  `void`
  `setLifespan(Lifespan lifespan)`
  Set the lifespan of this entry, truncating duplicates
  `void`
  `setLifespan(Lifespan lifespan, TraceObject.ConflictResolution resolution)`
  Set the lifespan of this entry
  `void`
  `setMaxSnap(long maxSnap)`
  Set the maximum snap of this entry
  `void`
  `setMinSnap(long minSnap)`
  Set the minimum snap of this entry
  `String`
  `toString()`
  `DBTraceObjectValue`
  `truncateOrDelete(Lifespan span)`
  Modify the lifespan or delete this entry, such that it no longer intersects the given span.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface ghidra.trace.model.target.TraceObjectValue

  `castValue, getTargetSchema, hasEntryKey, isHidden`

- ## Constructor Details

  - ### DBTraceObjectValue

    public DBTraceObjectValue(DBTraceObjectManager manager, ghidra.trace.database.target.TraceObjectValueStorage wrapped)

- ## Method Details

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getTrace

    public Trace getTrace()
    Description copied from interface: `TraceObjectValue`
    Get the trace containing this value entry
    Specified by:
      `getTrace` in interface `TraceObjectValue`
    Returns:
      the trace

  - ### getEntryKey

    public String getEntryKey()
    Description copied from interface: `TraceObjectValue`
    Get the key identifying this child to its parent
    Specified by:
      `getEntryKey` in interface `TraceObjectValue`
    Returns:
      the key

  - ### doGetCanonicalPath

    protected KeyPath doGetCanonicalPath()

  - ### getCanonicalPath

    public KeyPath getCanonicalPath()
    Description copied from interface: `TraceObjectValue`
    Get the "canonical path" of this value

    This is the parent's canonical path extended by this value's entry key. Note, in the case this value has a child object, this is not necessarily its canonical path.

    Specified by:
      `getCanonicalPath` in interface `TraceObjectValue`
    Returns:
      the canonical path

  - ### getValue

    public Object getValue()
    Description copied from interface: `TraceObjectValue`
    Get the value
    Specified by:
      `getValue` in interface `TraceObjectValue`
    Returns:
      the value

  - ### isObject

    public boolean isObject()
    Description copied from interface: `TraceObjectValue`
    Check if the value is an object (i.e., `TraceObject`)
    Specified by:
      `isObject` in interface `TraceObjectValue`
    Returns:
      true if an object, false otherwise

  - ### doIsCanonical

    protected boolean doIsCanonical()

  - ### isCanonical

    public boolean isCanonical()
    Description copied from interface: `TraceObjectValue`
    Check if this value represents its child's canonical location

    The value is canonical if the parent's canonical path extended by this value's key gives the child's canonical path. If the value is not a child object, the value cannot be canonical.

    Specified by:
      `isCanonical` in interface `TraceObjectValue`
    Returns:
      true if canonical

  - ### getLifespan

    public Lifespan getLifespan()
    Description copied from interface: `TraceObjectValue`
    Get the lifespan of this entry
    Specified by:
      `getLifespan` in interface `TraceObjectValue`
    Returns:
      the lifespan

  - ### setMinSnap

    public void setMinSnap(long minSnap)
    Description copied from interface: `TraceObjectValue`
    Set the minimum snap of this entry
    Specified by:
      `setMinSnap` in interface `TraceObjectValue`
    Parameters:
      `minSnap` - the minimum snap, or `Long.MIN_VALUE` for "since the beginning of time"
    See Also:
      - `TraceObjectValue.setLifespan(Lifespan)`

  - ### getMinSnap

    public long getMinSnap()
    Description copied from interface: `TraceObjectValue`
    Get the minimum snap of this entry
    Specified by:
      `getMinSnap` in interface `TraceObjectValue`
    Returns:
      the minimum snap, or `Long.MIN_VALUE` for "since the beginning of time"

  - ### setMaxSnap

    public void setMaxSnap(long maxSnap)
    Description copied from interface: `TraceObjectValue`
    Set the maximum snap of this entry
    Specified by:
      `setMaxSnap` in interface `TraceObjectValue`
    Parameters:
      `maxSnap` - the maximum snap, or `Long.MAX_VALUE` for "to the end of time"
    See Also:
      - `TraceObjectValue.setLifespan(Lifespan)`

  - ### getMaxSnap

    public long getMaxSnap()
    Description copied from interface: `TraceObjectValue`
    Get the maximum snap of this entry
    Specified by:
      `getMaxSnap` in interface `TraceObjectValue`
    Returns:
      the maximum snap, or `Long.MAX_VALUE` for "to the end of time"

  - ### delete

    public void delete()
    Description copied from interface: `TraceObjectValue`
    Delete this entry
    Specified by:
      `delete` in interface `TraceObjectValue`

  - ### isDeleted

    public boolean isDeleted()
    Description copied from interface: `TraceObjectValue`
    Check if this value entry has been deleted
    Specified by:
      `isDeleted` in interface `TraceObjectValue`
    Returns:
      true if the entry has been deleted

  - ### truncateOrDelete

    public DBTraceObjectValue truncateOrDelete(Lifespan span)
    Description copied from interface: `TraceObjectValue`
    Modify the lifespan or delete this entry, such that it no longer intersects the given span.

    If the given span and the current lifespan are already disjoint, this does nothing. If the given span splits the current lifespan in two, then a new entry is created for the later lifespan.

    Specified by:
      `truncateOrDelete` in interface `TraceObjectValue`
    Parameters:
      `span` - the span to clear
    Returns:
      this if the one entry remains, null if the entry is deleted, or the generated entry if a second is created.

  - ### getChild

    public DBTraceObject getChild()
    Description copied from interface: `TraceObjectValue`
    Get the value as an object
    Specified by:
      `getChild` in interface `TraceObjectValue`
    Returns:
      the child

  - ### setLifespan

    public void setLifespan(Lifespan lifespan)
    Description copied from interface: `TraceObjectValue`
    Set the lifespan of this entry, truncating duplicates
    Specified by:
      `setLifespan` in interface `TraceObjectValue`
    Parameters:
      `lifespan` - the new lifespan

  - ### setLifespan

    public void setLifespan(Lifespan lifespan, TraceObject.ConflictResolution resolution)
    Description copied from interface: `TraceObjectValue`
    Set the lifespan of this entry

    NOTE: For storage efficiency, when expanding the lifespan, the manager may coalesce this value with intersecting values having equal keys and values. Thus, the resulting lifespan may be larger than specified.

    Values cannot intersect and have the same key, otherwise the value of that key could not be uniquely determined at a given snap. Thus, when lifespans are being adjusted, such conflicts must be resolved.

    Specified by:
      `setLifespan` in interface `TraceObjectValue`
    Parameters:
      `lifespan` - the new lifespan
      `resolution` - specifies how to resolve duplicate keys with intersecting lifespans

  - ### getParent

    public DBTraceObject getParent()
    Description copied from interface: `TraceObjectValue`
    Get the parent object of this entry
    Specified by:
      `getParent` in interface `TraceObjectValue`
    Returns:
      the parent

  - ### doStreamVisitor

    protected Stream<? extends TraceObjectValPath> doStreamVisitor(Lifespan span, TreeTraversal.Visitor visitor)

  - ### getWrapped

    public ghidra.trace.database.target.TraceObjectValueStorage getWrapped()