java.lang.Object
org.odpi.openmetadata.openconnectors.governancedaemonconnectors.openlineageconnectors.janusconnector.graph.LineageGraphStorageService
All Implemented Interfaces:
LineageGraph

public class LineageGraphStorageService extends Object implements LineageGraph
  • Constructor Details

    • LineageGraphStorageService

      public LineageGraphStorageService(GraphHelper graphHelper, AuditLog auditLog)
  • Method Details

    • storeToGraph

      public void storeToGraph(Set<GraphContext> graphContext)
      Creates vertices and the relationships between them
      Specified by:
      storeToGraph in interface LineageGraph
      Parameters:
      graphContext - - graph Collection that contains vertices and edges to be stored
    • updateNeighbours

      public void updateNeighbours(LineageSyncUpdateContext syncUpdateContext)
      Updates the neighbours of a node by removing all the entities that no longer have a relationship with it.

      SyncUpdateContext contains the context for syncing the relationships of a node after an update.

      Specified by:
      updateNeighbours in interface LineageGraph
    • updateEntity

      public void updateEntity(LineageEntity lineageEntity)
      Updates the properties of a vertex
      Specified by:
      updateEntity in interface LineageGraph
      Parameters:
      lineageEntity - - LineageEntity object that has the updated values
    • upsertRelationship

      public void upsertRelationship(LineageRelationship lineageRelationship)
      Create or update the relationship between two edges In case the vertexes are not created, they are firstly created
      Specified by:
      upsertRelationship in interface LineageGraph
      Parameters:
      lineageRelationship - relationship to be updated or created
    • updateRelationship

      public void updateRelationship(LineageRelationship lineageRelationship)
      Updates the properties of an edge
      Specified by:
      updateRelationship in interface LineageGraph
      Parameters:
      lineageRelationship - - lineageRelationship object that has the updated values
    • updateClassification

      public void updateClassification(Set<GraphContext> classificationContext)
      Updates the classification of a vertex
      Specified by:
      updateClassification in interface LineageGraph
      Parameters:
      classificationContext - - LineageEntity object that has the updated values
    • deleteClassification

      public void deleteClassification(Set<GraphContext> classificationContext)
      Deletes a classification of a vertex
      Specified by:
      deleteClassification in interface LineageGraph
      Parameters:
      classificationContext - - any remaining classifications, empty map if none
    • deleteRelationship

      public void deleteRelationship(String guid)
      Description copied from interface: LineageGraph
      Deletes a relationship in the graph
      Specified by:
      deleteRelationship in interface LineageGraph
      Parameters:
      guid - unique identifier of the entity to be deleted
    • deleteEntity

      public void deleteEntity(String guid, Object version)
      Description copied from interface: LineageGraph
      /** Deletes a vertex in the graph
      Specified by:
      deleteEntity in interface LineageGraph
      Parameters:
      guid - unique identifier of the entity to be deleted
      version - version of the entity to be deleted
    • saveAssetLineageUpdateTime

      public void saveAssetLineageUpdateTime(Long lastUpdateTime)
      Description copied from interface: LineageGraph
      Save last asset lineage update time in the graph
      Specified by:
      saveAssetLineageUpdateTime in interface LineageGraph
      Parameters:
      lastUpdateTime - the standard epoch time in milliseconds
    • handleSaveAssetLineageUpdateTimeException

      public void handleSaveAssetLineageUpdateTimeException(Exception e)
    • getAssetLineageUpdateTime

      public Optional<Long> getAssetLineageUpdateTime()
      Description copied from interface: LineageGraph
      Gets last asset lineage update time from the graph
      Specified by:
      getAssetLineageUpdateTime in interface LineageGraph
      Returns:
      last update time represented as epoch time milliseconds
    • isEntityInGraph

      public Boolean isEntityInGraph(String guid)
      Returns whether an entity exists in the graph or not
      Specified by:
      isEntityInGraph in interface LineageGraph
      Parameters:
      guid - the lineage entity guid
      Returns: