src/main/java/org/hyperledger/fabric/sdk/Channel.java
/**
         * Record transactions event.
         *
         * @param transactionEvent
         * @return True if transactions have been seen on all eventing peers and eventhubs.
         */
Record transactions event.
@param transactionEvent
@return True if transactions have been seen on all eventing peers and eventhubs.
Record transactions event . @param transactionEvent @return True if transactions have been seen on all eventing peers and eventhubs .
boolean eventReceived(TransactionEvent transactionEvent) {
            sweepTime = System.currentTimeMillis() + DELTA_SWEEP; 
            Peer peer = transactionEvent.getPeer();
            if (peer != null) {
                unSeenPeers.remove(peer);
                logger.debug(format("Channel %s seen transaction event %s for peer %s", name, txID, peer.getName()));
            } else if (null != transactionEvent.getEventHub()) {
                EventHub eventHub = transactionEvent.getEventHub();
                logger.debug(format("Channel %s seen transaction event %s for eventHub %s", name, txID, eventHub.toString()));
                unSeenEventHubs.remove(eventHub);
            } else {
                logger.error(format("Channel %s seen transaction event %s with no associated peer or eventhub", name, txID));
            }
            boolean isEmpty;
            synchronized (this) {
                isEmpty = unSeenEventHubs.isEmpty() && unSeenPeers.isEmpty();
            }
            return isEmpty;
        }
boolean eventReceived ( TransactionEvent transactionEvent ) { sweepTime = System . currentTimeMillis ( ) + DELTA_SWEEP ; Peer peer = transactionEvent . getPeer ( ) ; if ( peer != null ) { unSeenPeers . remove ( peer ) ; logger . debug ( format ( "Channel %s seen transaction event %s for peer %s" , name , txID , peer . getName ( ) ) ) ; } else if ( null != transactionEvent . getEventHub ( ) ) { EventHub eventHub = transactionEvent . getEventHub ( ) ; logger . debug ( format ( "Channel %s seen transaction event %s for eventHub %s" , name , txID , eventHub . toString ( ) ) ) ; unSeenEventHubs . remove ( eventHub ) ; } else { logger . error ( format ( "Channel %s seen transaction event %s with no associated peer or eventhub" , name , txID ) ) ; } boolean isEmpty ; synchronized ( this ) { isEmpty = unSeenEventHubs . isEmpty ( ) && unSeenPeers . isEmpty ( ) ; } return isEmpty ; }
Record transactions event.
Record transactions event .
//seen activity keep it active.