Create buckets using callback attributes

@param stopwatch Target stopwatch
@return Created buckets
558947
@Override
	protected Buckets createBuckets(Stopwatch stopwatch) {
		return createBuckets(stopwatch, min * SimonClock.NANOS_IN_MILLIS, max * SimonClock.NANOS_IN_MILLIS, bucketNb);
	}
494926
public static WatchMonitor createAll(String path, Watcher watcher){
		return createAll(Paths.get(path), watcher);
	}
807432
@Override
  public List<? extends OutputWriter<ByteBuffer>> createWriters(int numShards) {
    ImmutableList.Builder<SizeSegmentingGoogleCloudStorageFileWriter> result =
        new ImmutableList.Builder<>();
    for (int i = 0; i < numShards; ++i) {
      result.add(new SizeSegmentingGoogleCloudStorageFileWriter(bucket, fileNamePattern, i,
          mimeType, segmentSizeLimit));
    }
    return result.build();
  }
1252251
@SuppressWarnings("checkstyle:illegalCatch")
  public Throwable dispatch(final StopTime stopTime) {
    try {
      for (final EventHandler<StopTime> handler : stopHandlers) {
        handler.onNext(stopTime);
      }
      return null;
    } catch (Throwable t) {
      return t;
    }
  }
1087282
public String createNode(final String path, final boolean watch, final boolean ephimeral) {
		String createdNodePath = null;
		try {

			final Stat nodeStat =  zooKeeper.exists(path, watch);

			if(nodeStat == null) {
				createdNodePath = zooKeeper.create(path, new byte[0], Ids.OPEN_ACL_UNSAFE, (ephimeral ?  CreateMode.EPHEMERAL_SEQUENTIAL : CreateMode.PERSISTENT));
			} else {
				createdNodePath = path;
			}

		} catch (KeeperException | InterruptedException e) {
			throw new IllegalStateException(e);
		}

		return createdNodePath;
	}
756144
public static WatchMonitor createAll(File file, int maxDepth, Watcher watcher) {
		return createAll(file.toPath(), 0, watcher);
	}
887059
private org.javasimon.jmx.StopwatchSample sampleStopwatch(Simon s) {
		return new StopwatchSample((org.javasimon.StopwatchSample) s.sample());
	}
1086553
def buckets(self, start, end):
    '''
    
    '''
    rval = [ self.to_bucket(start) ]
    step = 1

    # In theory there's already been a check that end>start
    # TODO: Not a fan of an unbound while loop here
    while True:
      bucket = self.to_bucket(start, step)
      bucket_time = self.from_bucket( bucket )
      if bucket_time >= end:
        if bucket_time==end:
          rval.append( bucket )
        break
      rval.append( bucket )
      step += 1

    return rval
347448
@SuppressWarnings("UnusedParameters")
	protected LogTemplate<Split> createLogTemplate(Stopwatch stopwatch) {
		LogTemplate<Split> logTemplate;
		if (logEnabled) {
			logTemplate = everyNSplits(enabledStopwatchLogTemplate, capacity);
		} else {
			logTemplate = disabled();
		}
		return logTemplate;
	}
954495
public static Stopwatch start(MonitorConfig config) {
    return INSTANCE.get(config, TimeUnit.MILLISECONDS).start();
  }
1293471
public static Bucket create(CouchbaseMock mock, BucketConfiguration config) throws IOException {
          switch (config.type) {
                case MEMCACHED:
                    return new MemcachedBucket(mock, config);
                case COUCHBASE:
                    return new CouchbaseBucket(mock, config);
                default:
                    throw new FileNotFoundException("I don't know about this type...");
            }
    }
86905
def create_bucket(self, name):
        
        log.info('Creating bucket %s...' % name)
        self.s3.create_bucket(name)
816597
private ArrayList<String> getBuckets() {
        String bucketList = getString(KEY_BUCKETS);
        if (bucketList.equals(NO_STRING_VALUE)) {
            return new ArrayList<>();
        } else {
            return deserializeString(bucketList);
        }
    }
1331205
function createIndices(callback) {
      const q = queue();
      geojson_files.forEach((gj) => {
        q.defer(createIndex, gj);
      });

      q.awaitAll((err) => {
        if (err) return callback(err);
        return callback();
      });
    }
528759
public static WatchMonitor create(String path, WatchEvent.Kind<?>... events){
		return create(path, 0, events);
	}
713683
@VisibleForTesting
  synchronized Bucket<V> getBucket(int bucketedSize) {
    // get an existing bucket
    Bucket<V> bucket = mBuckets.get(bucketedSize);
    if (bucket != null || !mAllowNewBuckets) {
      return bucket;
    }

    // create a new bucket
    if (FLog.isLoggable(FLog.VERBOSE)) {
      FLog.v(TAG, "creating new bucket %s", bucketedSize);
    }
    Bucket<V> newBucket = newBucket(bucketedSize);
    mBuckets.put(bucketedSize, newBucket);
    return newBucket;
  }
372396
public static WatchMonitor create(URI uri, int maxDepth, WatchEvent.Kind<?>... events){
		return create(Paths.get(uri), maxDepth, events);
	}