protected int deleteChildren ( final TicketGrantingTicket ticket ) { val count = new AtomicInteger ( 0 ) ; val services = ticket . getServices ( ) ; if ( services != null && ! services . isEmpty ( ) ) { services . keySet ( ) . forEach ( ticketId -> { if ( deleteSingleTicket ( ticketId ) ) { LOGGER . debug ( "Removed ticket [{}]" , ticketId ) ; count . incrementAndGet ( ) ; } else { LOGGER . debug ( "Unable to remove ticket [{}]" , ticketId ) ; } } ) ; } return count . intValue ( ) ; }
Delete TGT s service tickets .