Move REST endpoints to singleton scope

The majority of REST endpoints don't maintain state and don't need to be
created each time they are used. Exceptions are endpoints with @Option
annotation and therefore must stay in default scope.

Change-Id: Ia2ac8cfccf41966daa48334cedcb7a20101474d2
This commit is contained in:
David Ostrovsky
2014-05-24 22:11:25 +02:00
committed by Shawn Pearce
parent f10c28adc7
commit 75f1583de0
115 changed files with 361 additions and 106 deletions

View File

@@ -35,12 +35,14 @@ import com.google.gerrit.server.query.change.ChangeData;
import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
@Singleton
public class ReviewerJson {
private final Provider<ReviewDb> db;
private final ChangeData.Factory changeDataFactory;