@ 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 .