@SuppressWarnings({ "unchecked", "rawtypes" })
    public int getConnectionCount() {

        Sync[] syncs = connections.values().toArray(new Sync[0]);
        int count = 0;

        for (Sync sync : syncs) {
            if (sync.isComplete()) {
                count++;
            }
        }

        return count;
    }
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public int getConnectionCount ( ) { Sync [ ] syncs = connections . values ( ) . toArray ( new Sync [ 0 ] ) ; int count = 0 ; for ( Sync sync : syncs ) { if ( sync . isComplete ( ) ) { count ++ ; } } return count ; }
@return number of established connections.