Merge "Bump guava version to 18.0"

This commit is contained in:
David Pursehouse 2014-09-08 10:54:18 +00:00 committed by Gerrit Code Review
commit 9145d30c60
5 changed files with 7 additions and 7 deletions

View File

@ -130,7 +130,7 @@ public class RebuildNotedb extends SiteProgram {
futures.add(future); futures.add(future);
future.addListener( future.addListener(
new RebuildListener(c.getId(), future, ok, doneTask, failedTask), new RebuildListener(c.getId(), future, ok, doneTask, failedTask),
MoreExecutors.sameThreadExecutor()); MoreExecutors.directExecutor());
} }
mpm.waitFor(Futures.transform(Futures.successfulAsList(futures), mpm.waitFor(Futures.transform(Futures.successfulAsList(futures),
@ -212,7 +212,7 @@ public class RebuildNotedb extends SiteProgram {
dbInjector.getInstance(WorkQueue.class) dbInjector.getInstance(WorkQueue.class)
.createQueue(threads, "RebuildChange")); .createQueue(threads, "RebuildChange"));
} else { } else {
return MoreExecutors.sameThreadExecutor(); return MoreExecutors.newDirectExecutorService();
} }
} }

View File

@ -60,7 +60,7 @@ public class ReceiveCommitsExecutorModule extends AbstractModule {
public ListeningExecutorService createChangeUpdateExecutor(@GerritServerConfig Config config) { public ListeningExecutorService createChangeUpdateExecutor(@GerritServerConfig Config config) {
int poolSize = config.getInt("receive", null, "changeUpdateThreads", 1); int poolSize = config.getInt("receive", null, "changeUpdateThreads", 1);
if (poolSize <= 1) { if (poolSize <= 1) {
return MoreExecutors.sameThreadExecutor(); return MoreExecutors.newDirectExecutorService();
} }
return MoreExecutors.listeningDecorator( return MoreExecutors.listeningDecorator(
MoreExecutors.getExitingExecutorService( MoreExecutors.getExitingExecutorService(

View File

@ -195,7 +195,7 @@ public class ChangeBatchIndexer {
fail(project, e); fail(project, e);
throw e; throw e;
} }
}, MoreExecutors.sameThreadExecutor()); }, MoreExecutors.directExecutor());
} }
try { try {

View File

@ -106,7 +106,7 @@ public class IndexModule extends LifecycleModule {
threads = config.getInt("index", null, "threads", 0); threads = config.getInt("index", null, "threads", 0);
} }
if (threads <= 0) { if (threads <= 0) {
return MoreExecutors.sameThreadExecutor(); return MoreExecutors.newDirectExecutorService();
} }
return MoreExecutors.listeningDecorator( return MoreExecutors.listeningDecorator(
workQueue.createQueue(threads, "index")); workQueue.createQueue(threads, "index"));

View File

@ -51,8 +51,8 @@ maven_jar(
maven_jar( maven_jar(
name = 'guava', name = 'guava',
id = 'com.google.guava:guava:17.0', id = 'com.google.guava:guava:18.0',
sha1 = '9c6ef172e8de35fd8d4d8783e4821e57cdef7445', sha1 = 'cce0823396aa693798f8882e64213b1772032b09',
license = 'Apache2.0', license = 'Apache2.0',
) )