Skip to content

Commit

Permalink
Make SegmentHandoffNotifier Closeable.
Browse files Browse the repository at this point in the history
  • Loading branch information
gianm committed Mar 11, 2016
1 parent ad5ffdf commit 92c828f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ public void start()
}

@Override
public void stop()
public void close()
{
//Noop
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public void start()
}

@Override
public void stop()
public void close()
{
//Noop
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public boolean apply(DruidServerMetadata input)
}

@Override
public void stop()
public void close()
{
scheduledExecutor.shutdown();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ public String apply(Sink input)
}
}

handoffNotifier.stop();
handoffNotifier.close();
shutdownExecutors();

stopped = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@

import io.druid.query.SegmentDescriptor;

import java.io.Closeable;
import java.util.concurrent.Executor;

public interface SegmentHandoffNotifier
public interface SegmentHandoffNotifier extends Closeable
{
/**
* register a handOffCallback to be called when segment handoff is complete.
Expand All @@ -47,6 +48,6 @@ boolean registerSegmentHandoffCallback(
/**
* Perform any final processing and clean up after ourselves.
*/
void stop();
void close();

}

0 comments on commit 92c828f

Please sign in to comment.