private Map < String , Integer > getAttemptsMap ( String projectId , String eventCollection ) throws IOException { Map < String , Integer > attempts = new HashMap < String , Integer > ( ) ; if ( eventStore instanceof KeenAttemptCountingEventStore ) { KeenAttemptCountingEventStore res = ( KeenAttemptCountingEventStore ) eventStore ; String attemptsJSON = res . getAttempts ( projectId , eventCollection ) ; if ( attemptsJSON != null ) { StringReader reader = new StringReader ( attemptsJSON ) ; Map < String , Object > attemptTmp = jsonHandler . readJson ( reader ) ; for ( Entry < String , Object > entry : attemptTmp . entrySet ( ) ) { if ( entry . getValue ( ) instanceof Number ) { attempts . put ( entry . getKey ( ) , ( ( Number ) entry . getValue ( ) ) . intValue ( ) ) ; } } } } return attempts ; }
Gets the map of attempt counts from the eventStore