Skip to content

Commit a7272d1

Browse files
author
Tom May
committed
Make things pretter with final and non-public.
1 parent a121cc4 commit a7272d1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

plugins/client/lru/src/main/java/org/elasticsearch/client/node/lru/LruIndexManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
*
2020
* @author matt
2121
*/
22-
public class LruIndexManager {
23-
public static final int MAX_OPEN_RETRIES = 3;
22+
class LruIndexManager {
23+
private static final int MAX_OPEN_RETRIES = 3;
2424

25-
private Map cache;
26-
private NodeAdminClient admin;
2725
private final ESLogger logger = Loggers.getLogger(getClass());
26+
private final Map cache;
27+
private final NodeAdminClient admin;
2828

2929
public LruIndexManager(int cache_size, NodeAdminClient admin) {
3030
this.cache = Collections.synchronizedMap(new LruCache(cache_size));

plugins/client/lru/src/main/java/org/elasticsearch/client/node/lru/LruNodeClient.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
public class LruNodeClient extends NodeClient {
5757

58-
private final ESLogger logger;
58+
private final ESLogger logger = Loggers.getLogger(getClass());
5959
private final LruIndexManager lru;
6060

6161
@Inject public LruNodeClient(Settings settings, ThreadPool threadPool, NodeAdminClient admin,
@@ -64,7 +64,6 @@ public class LruNodeClient extends NodeClient {
6464
TransportSearchAction searchAction, TransportSearchScrollAction searchScrollAction,
6565
TransportMoreLikeThisAction moreLikeThisAction) {
6666
super(settings,threadPool,admin,indexAction,deleteAction,bulkAction,deleteByQueryAction,getAction,countAction,searchAction,searchScrollAction,moreLikeThisAction);
67-
this.logger = Loggers.getLogger(getClass());
6867
this.lru = new LruIndexManager(settings.getAsInt("node.lrucache.size", 1), admin);
6968
}
7069

0 commit comments

Comments
 (0)