library/src/main/java/com/kdgregory/aws/utils/cloudwatch/CloudWatchLogsUtil.java
/**
     *  Deletes a log group, waiting for it to go away, a timeout elapses, or the
     *  calling thread is interrupted.
     *
     *  @param  client          The service client.
     *  @param  groupName       The name of the group.
     *  @param  timeout         Number of milliseconds to wait for confirmation that the
     *                          group has been deleted.
     *
     *  @return <code>true</code> if the group was confirmed deleted, <code>false</code>
     *          if not (timeout or interrupt).
     */
Deletes a log group, waiting for it to go away, a timeout elapses, or the
calling thread is interrupted.

@param  client          The service client.
@param  groupName       The name of the group.
@param  timeout         Number of milliseconds to wait for confirmation that the
group has been deleted.

@return true if the group was confirmed deleted, false
if not (timeout or interrupt).
Deletes a log group waiting for it to go away a timeout elapses or the calling thread is interrupted . @param client The service client . @param groupName The name of the group . @param timeout Number of milliseconds to wait for confirmation that the group has been deleted . @return true if the group was confirmed deleted false if not ( timeout or interrupt ) .
public static boolean deleteLogGroup(AWSLogs client, String groupName, long timeout)
    {
        logger.debug("deleting CloudWatch log group: " + groupName);
        try
        {
            DeleteLogGroupRequest request = new DeleteLogGroupRequest().withLogGroupName(groupName);
            client.deleteLogGroup(request);
        }
        catch (ResourceNotFoundException ex)
        {
            return true;
        }
        catch (OperationAbortedException ex)
        {
        }
        long timeoutAt = System.currentTimeMillis() + timeout;
        while (System.currentTimeMillis() < timeoutAt)
        {
            if (describeLogGroup(client, groupName) == null)
                return true;
            try
            {
                Thread.sleep(RESOURCE_TRANSITION_DESCRIBE_INTERVAL);
            }
            catch (InterruptedException ex)
            {
                return false;
            }
        }
        logger.warn("timeout waiting for deleted CloudWatch log group: " + groupName);
        return false;
    }
public static boolean deleteLogGroup ( AWSLogs client , String groupName , long timeout ) { logger . debug ( "deleting CloudWatch log group: " + groupName ) ; try { DeleteLogGroupRequest request = new DeleteLogGroupRequest ( ) . withLogGroupName ( groupName ) ; client . deleteLogGroup ( request ) ; } catch ( ResourceNotFoundException ex ) { return true ; } catch ( OperationAbortedException ex ) { } long timeoutAt = System . currentTimeMillis ( ) + timeout ; while ( System . currentTimeMillis ( ) < timeoutAt ) { if ( describeLogGroup ( client , groupName ) == null ) return true ; try { Thread . sleep ( RESOURCE_TRANSITION_DESCRIBE_INTERVAL ) ; } catch ( InterruptedException ex ) { return false ; } } logger . warn ( "timeout waiting for deleted CloudWatch log group: " + groupName ) ; return false ; }
Deletes a log group, waiting for it to go away, a timeout elapses, or the
  calling thread is interrupted.
Deletes a log group waiting for it to go away a timeout elapses or the calling thread is interrupted .
// fall through to verification loop