public static synchronized boolean denyID ( String id ) { boolean rv = false ; if ( deniedID == null ) { deniedID = new HashMap < String , Counter > ( ) ; deniedID . put ( id , new Counter ( id ) ) ; // Noted duplicated for minimum time spent rv = true ; } else if ( deniedID . get ( id ) == null ) { deniedID . put ( id , new Counter ( id ) ) ; rv = true ; } if ( rv ) { writeID ( ) ; } return rv ; }
Return of True means ID has been added . Return of False means ID already added .