Code example for ScheduledThreadPoolExecutor

0"nodeId="+nodeId+", partition=" + partitionId + " does not exist, directory created.");
    // format "ss mm hh" meaning at hh:mm:ss time of the day, we roll forward for DAILY rolling 
    // if it is hourly rolling, it means at mm:ss time of the hour, we roll forward 
    // if it is MINUTELY, it means at ss seond of the minute, we roll forward. 
    ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
    HourGlassScheduler scheduler = new HourGlassScheduler(frequency, schedule, appendOnly, trimThreshold);
    HourglassDirectoryManagerFactory dirmgr = new HourglassDirectoryManagerFactory(partDir, scheduler,_dirMode);"creating Hourglass for nodeId: " + nodeId + " partition: " + partitionId);
    return new Hourglass<BoboIndexReader,T>(dirmgr, _interpreter, _indexReaderDecorator, _zoieConfig, hourglassListeners, executor);
  // TODO: change to getDirectoryManager 
  public File getPath(int nodeId,int partitionId)
    return getPath(_idxDir,nodeId,partitionId);