@Override
    public void onAnnouncementComplete(com.netflix.hollow.api.producer.Status status, HollowProducer.ReadState readState, long version, Duration elapsed) {
        boolean isAnnouncementSuccess = false;
        long dataSizeBytes = 0l;

        if (status.getType() == com.netflix.hollow.api.producer.Status.StatusType.SUCCESS) {
            isAnnouncementSuccess = true;
            lastAnnouncementSuccessTimeNanoOptional = OptionalLong.of(System.nanoTime());
        }

        HollowReadStateEngine stateEngine = readState.getStateEngine();
        dataSizeBytes = stateEngine.calcApproxDataSize();

        announcementMetricsBuilder
                .setDataSizeBytes(dataSizeBytes)
                .setIsAnnouncementSuccess(isAnnouncementSuccess)
                .setAnnouncementDurationMillis(elapsed.toMillis());

        lastAnnouncementSuccessTimeNanoOptional.ifPresent(announcementMetricsBuilder::setLastAnnouncementSuccessTimeNano);

        announcementMetricsReporting(announcementMetricsBuilder.build());
    }
@Override
    public void onAnnouncementComplete(com.netflix.hollow.api.producer.Status status, HollowProducer.ReadState readState, long version, Duration elapsed) {
        boolean isAnnouncementSuccess = false;
        long dataSizeBytes = 0l;

        if (status.getType() == com.netflix.hollow.api.producer.Status.StatusType.SUCCESS) {
            isAnnouncementSuccess = true;
            lastAnnouncementSuccessTimeNanoOptional = OptionalLong.of(System.nanoTime());
        }

        HollowReadStateEngine stateEngine = readState.getStateEngine();
        dataSizeBytes = stateEngine.calcApproxDataSize();

        announcementMetricsBuilder
                .setDataSizeBytes(dataSizeBytes)
                .setIsAnnouncementSuccess(isAnnouncementSuccess)
                .setAnnouncementDurationMillis(elapsed.toMillis());

        lastAnnouncementSuccessTimeNanoOptional.ifPresent(announcementMetricsBuilder::setLastAnnouncementSuccessTimeNano);

        announcementMetricsReporting(announcementMetricsBuilder.build());
    }
@ Override public void onAnnouncementComplete ( com . netflix . hollow . api . producer . Status status , HollowProducer . ReadState readState , long version , Duration elapsed ) { boolean isAnnouncementSuccess = false ; long dataSizeBytes = 0l ; if ( status . getType ( ) == com . netflix . hollow . api . producer . Status . StatusType . SUCCESS ) { isAnnouncementSuccess = true ; lastAnnouncementSuccessTimeNanoOptional = OptionalLong . of ( System . nanoTime ( ) ) ; } HollowReadStateEngine stateEngine = readState . getStateEngine ( ) ; dataSizeBytes = stateEngine . calcApproxDataSize ( ) ; announcementMetricsBuilder . setDataSizeBytes ( dataSizeBytes ) . setIsAnnouncementSuccess ( isAnnouncementSuccess ) . setAnnouncementDurationMillis ( elapsed . toMillis ( ) ) ; lastAnnouncementSuccessTimeNanoOptional . ifPresent ( announcementMetricsBuilder :: setLastAnnouncementSuccessTimeNano ) ; announcementMetricsReporting ( announcementMetricsBuilder . build ( ) ) ; }
Reports announcement-related metrics.
@param status Indicates whether the announcement succeeded of failed
@param readState Hollow data state that is being published, used in this method for computing data size
@param version Version of data that was announced
@param elapsed Announcement start to end duration
Reports announcement - related metrics .