Provide default implementation of stop() method in Index interface

Most index implementations have an empty stop() method. Make use of
Java 8 and make the empty stop() method the default implementation in
the Index interface, so that most indexes don't need to implement it.

Change-Id: I3889b4a13f7253e4129254f946040f8714c3a570
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2017-01-03 07:51:14 +01:00
committed by ekempin
parent 95762d747a
commit 43474192f6
8 changed files with 1 additions and 29 deletions

View File

@@ -117,10 +117,6 @@ class ElasticAccountIndex extends AbstractElasticIndex<Account.Id, AccountState>
}
}
@Override
public void stop() {
}
@Override
public DataSource<AccountState> getSource(Predicate<AccountState> p,
QueryOptions opts) throws QueryParseException {

View File

@@ -158,10 +158,6 @@ class ElasticChangeIndex extends AbstractElasticIndex<Change.Id, ChangeData>
}
}
@Override
public void stop() {
}
@Override
public ChangeDataSource getSource(Predicate<ChangeData> p, QueryOptions opts)
throws QueryParseException {