library/src/main/java/com/kdgregory/aws/utils/cloudwatch/CloudWatchLogsUtil.java
/**
     *  Waits until a log group has been created, a timeout elapses, or the thread
     *  was interrupted.
     *
     *  @param  client          The service client.
     *  @param  groupName       The name of the group.
     *  @param  timeout         The number of milliseconds to attempt to retrieve
     *                          the group's information before giving up.
     *  @param  retryInterval   The number of milliseconds to wait between attempts
     *                          to retrieve the group information. This is used to
     *                          avoid throttling; 250 is generally a good number.
     *
     *  @return The group description, <code>null</code> if unable to retrieve the
     *          group before the timeout expired.
     */
Waits until a log group has been created, a timeout elapses, or the thread
was interrupted.

@param  client          The service client.
@param  groupName       The name of the group.
@param  timeout         The number of milliseconds to attempt to retrieve
the group's information before giving up.
@param  retryInterval   The number of milliseconds to wait between attempts
to retrieve the group information. This is used to
avoid throttling; 250 is generally a good number.

@return The group description, null if unable to retrieve the
group before the timeout expired.
Waits until a log group has been created a timeout elapses or the thread was interrupted . @param client The service client . @param groupName The name of the group . @param timeout The number of milliseconds to attempt to retrieve the group ' s information before giving up . @param retryInterval The number of milliseconds to wait between attempts to retrieve the group information . This is used to avoid throttling ; 250 is generally a good number . @return The group description null if unable to retrieve the group before the timeout expired .
public static LogGroup waitUntilCreated(AWSLogs client, String groupName, long timeout, long retryInterval)
    {
        long timeoutAt = System.currentTimeMillis() + timeout;
        while (System.currentTimeMillis() < timeoutAt)
        {
            LogGroup group = describeLogGroup(client, groupName);
            if (group != null)
                return group;
            try
            {
                Thread.sleep(retryInterval);
            }
            catch (InterruptedException e)
            {
                return null;
            }
        }
        logger.warn("timeout expired waiting for CloudWatch log group creation: " + groupName);
        return null;
    }
public static LogGroup waitUntilCreated ( AWSLogs client , String groupName , long timeout , long retryInterval ) { long timeoutAt = System . currentTimeMillis ( ) + timeout ; while ( System . currentTimeMillis ( ) < timeoutAt ) { LogGroup group = describeLogGroup ( client , groupName ) ; if ( group != null ) return group ; try { Thread . sleep ( retryInterval ) ; } catch ( InterruptedException e ) { return null ; } } logger . warn ( "timeout expired waiting for CloudWatch log group creation: " + groupName ) ; return null ; }
Waits until a log group has been created, a timeout elapses, or the thread
  was interrupted.
Waits until a log group has been created a timeout elapses or the thread was interrupted .
// FIXME - handle throttling