Class LedgerViewFlowable.LedgerView<R>

  • Type Parameters:
    R - The type of the contracts in this application.
    Direct Known Subclasses:
    LedgerViewFlowable.LedgerTestView
    Enclosing class:
    LedgerViewFlowable

    public static class LedgerViewFlowable.LedgerView<R>
    extends java.lang.Object
    The local view of the Ledger. This view is created and updated every time a new event is received by the client.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PMap<java.lang.String,​R>> activeContractSet  
      protected org.pcollections.PMap<java.lang.String,​org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PSet<java.lang.String>>> commandIdToContractIds  
      protected org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PMap<java.lang.String,​org.pcollections.PSet<java.lang.String>>> contractIdsToCommandIds  
      protected org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PMap<java.lang.String,​R>> pendingContractSet  
    • Field Detail

      • commandIdToContractIds

        protected final org.pcollections.PMap<java.lang.String,​org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PSet<java.lang.String>>> commandIdToContractIds
      • contractIdsToCommandIds

        protected final org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PMap<java.lang.String,​org.pcollections.PSet<java.lang.String>>> contractIdsToCommandIds
      • pendingContractSet

        protected final org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PMap<java.lang.String,​R>> pendingContractSet
      • activeContractSet

        protected final org.pcollections.PMap<com.daml.ledger.javaapi.data.Identifier,​org.pcollections.PMap<java.lang.String,​R>> activeContractSet
    • Method Detail

      • getContracts

        public org.pcollections.PMap<java.lang.String,​R> getContracts​(com.daml.ledger.javaapi.data.Identifier templateId)
        Parameters:
        templateId - The template of the contracts in which the client is interested
        Returns:
        A map contractId to contract containing all the contracts with template id equal to the one passed as argument
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object