Skip to content

Commit

Permalink
Make fields final
Browse files Browse the repository at this point in the history
Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/9095/
  • Loading branch information
gbehrmann committed Mar 8, 2016
1 parent e8b82bd commit 56fc8af
Show file tree
Hide file tree
Showing 82 changed files with 212 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ public class ExecAuth implements Runnable {

private BufferedReader _input;
private PrintWriter _output;
private String _execPath;
private final String _execPath;

public ExecAuth( String execpath ){
_execPath = execpath ;
new Thread(this).start() ;
}
private class Destroy implements Runnable {
private InputStream _error;
private final InputStream _error;
private Destroy( InputStream in ){
_error = in ;
new Thread(this).start() ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class LegacyAdminShell
private final CellStub _pnfsManager;
private final CellStub _cellStub;
private String _user;
private String _authUser;
private final String _authUser;
private long _timeout = TimeUnit.SECONDS.toMillis(10);
private boolean _fullException;
private final String _instance ;
Expand Down Expand Up @@ -220,12 +220,12 @@ private void mergePath(Path path)
private class Path
{

private String _pathString;
private final String _pathString;
private boolean _isAbsolutePath;
private boolean _isPath;
private boolean _isDomain;

private String[] _path;
private final String[] _path;

private Path(String pathString)
{
Expand Down Expand Up @@ -811,8 +811,8 @@ private String uncache(String destination, String target, StringBuffer sb)

private class PnfsFlagReply
{
private PnfsId _pnfsId;
private PnfsFlagMessage _message;
private final PnfsId _pnfsId;
private final PnfsFlagMessage _message;

public PnfsFlagReply(PnfsId pnfsId, PnfsFlagMessage message)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class PAMAuthentificator extends CellAdapter {
private PAM_Auth _pam;
private ExecAuth _execAuth;

private Args _args;
private final Args _args;
private Date _started = new Date() ;

private int _requestCount;
Expand Down Expand Up @@ -493,9 +493,9 @@ private Serializable getMetaInfo( Object [] request )throws Exception {
return r ;
}
private static final long HASH_REFRESH = 4*3600*1000 ;
private AgingHash _map = new AgingHash(400) ;
private final AgingHash _map = new AgingHash(400) ;
private class UserRecord {
private Attributes _userRecord;
private final Attributes _userRecord;
private long _timestamp;
private UserRecord( Attributes userRecord ){
_userRecord = userRecord ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class PAM_Auth {

private String _service;
private final String _service;
private static boolean _libLoaded;

private native int checkUser(String service,String user, String pass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public class DateRenderer implements AttributeRenderer
{
private Map<String, DateFormat> formatMap = Maps.newHashMap();
private final Map<String, DateFormat> formatMap = Maps.newHashMap();
private static final String DEFAULT_FORMAT_PATTERN = "MM.dd HH:mm:ss";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

public class PoolSelectionRequest {

private long _size;
String _pnfsid;
private ProtocolInfo _protocolInfo;
private StorageInfo _storageInfo;
private final long _size;
private final String _pnfsid;
private final ProtocolInfo _protocolInfo;
private final StorageInfo _storageInfo;

PoolSelectionRequest(long size, String pnfsid, StorageInfo storageInfo, ProtocolInfo protocolInfo){
_size = size;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class TransferObserverV1
= new HashMap<>();


private static String[] __className =
private static final String[] __className =
{
"cell", // 0
"domain", // 1
Expand All @@ -82,7 +82,7 @@ public class TransferObserverV1
"started" // 16
};

private static String[] __listHeader =
private static final String[] __listHeader =
{
"Cell", // 0
"Domain", // 1
Expand Down Expand Up @@ -219,9 +219,9 @@ public void cleanUp()

private static class TableEntry
{
private String _tableName;
private int [] _fields;
private String _title;
private final String _tableName;
private final int [] _fields;
private final String _title;
private long _olderThan;
private boolean _ifNotYetStarted;
private boolean _ifMoverMissing;
Expand All @@ -230,6 +230,7 @@ private TableEntry(String tableName, int [] fields)
{
_tableName = tableName;
_fields = fields;
_title = null;
}

private TableEntry(String tableName, int [] fields, String title)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.ExecutionException;

import diskCacheV111.poolManager.PoolManagerCellInfo;
import diskCacheV111.pools.PoolCellInfo;
Expand Down Expand Up @@ -55,7 +54,7 @@ private class SleepHandler
private long _started;
private long _shortPeriod = 20000L;
private long _regularPeriod = 120000L;
private long _retentionFactor = 4;
private final long _retentionFactor = 4;

private SleepHandler(boolean aggressive)
{
Expand Down Expand Up @@ -119,7 +118,7 @@ public String toString()
}

private SleepHandler _sleepHandler;
private SimpleDateFormat _formatter = new SimpleDateFormat ("MM/dd HH:mm:ss");
private final SimpleDateFormat _formatter = new SimpleDateFormat ("MM/dd HH:mm:ss");

private class CellQueryInfo
{
Expand Down Expand Up @@ -429,7 +428,7 @@ public void messageArrived(CellMessage message)

private class ActionHeaderExtension
{
private TreeMap<String,int[]> _map; // TreeMap because we need it sorted
private final TreeMap<String,int[]> _map; // TreeMap because we need it sorted
private ActionHeaderExtension(TreeMap<String,int[]> map)
{
_map = map == null ? new TreeMap<>() : map;
Expand Down Expand Up @@ -760,18 +759,10 @@ private synchronized void printPoolInfoTable(HTMLBuilder page)

private class PoolCostEntry
{
String _cellName;
String _domainName;
int[][] _row;
Map<String,PoolCostInfo.NamedPoolQueueInfo> _movers;

PoolCostEntry(String name, String domain, int[][] row)
{
_cellName = name;
_domainName = domain;
_row = row;
_movers = null;
}
final String _cellName;
final String _domainName;
final int[][] _row;
final Map<String,PoolCostInfo.NamedPoolQueueInfo> _movers;

PoolCostEntry(String name, String domain, int[][] row, Map<String, PoolCostInfo.NamedPoolQueueInfo> movers)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public class CopyManager extends AbstractCellComponent
private InetSocketAddress _localAddr;
private long _moverTimeout = 24;
private TimeUnit _moverTimeoutUnit = TimeUnit.HOURS;
private int _bufferSize = 256 * 1024;
private int _tcpBufferSize = 256 * 1024;
private static final int BUFFER_SIZE = 256 * 1024;
private static final int TCP_BUFFER_SIZE = 256 * 1024;
private int _maxTransfers = 30;
private int _numTransfers;

Expand Down Expand Up @@ -437,8 +437,8 @@ private ProtocolInfo createTargetProtocolInfo(RedirectedTransfer<DCapClientPortA
getCellName(),
getCellDomainName(),
target.getId(),
_bufferSize,
_tcpBufferSize);
BUFFER_SIZE,
TCP_BUFFER_SIZE);
}

private ProtocolInfo createSourceProtocolInfo(DCapClientPortAvailableMessage redirect, long id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class FTPTransactionLog

private FileWriter LWriter;
private File LogFilePath;
private String root;
private final String root;
private String tid;
private boolean GotMiddle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class HsmControlOsm extends CellAdapter implements Runnable {
private int _requests;
private int _failed;
private int _outstandingRequests;
private File _database;
private final File _database;

private final BlockingQueue<CellMessage> _fifo = new LinkedBlockingQueue<>(MAX_QUEUE_SIZE);

Expand Down Expand Up @@ -140,7 +140,7 @@ public void run(){
_log.info("Working thread finished");
}
}
private Map<String, Object[]> _driverMap = new HashMap<>() ;
private final Map<String, Object[]> _driverMap = new HashMap<>() ;
public static final String hh_check_osm = "<store> <bfid>";
public String ac_check_osm_$_2( Args args )throws Exception {
String store = args.argv(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
*/
public class HsmDriverOSM implements HsmControllable {

private Logger _log = LoggerFactory.getLogger(HsmDriverOSM.class);
private static final Logger LOGGER = LoggerFactory.getLogger(HsmDriverOSM.class);

private Args _global;
private Args _local;
private String _command;
private final Args _global;
private final Args _local;
private final String _command;

public HsmDriverOSM( Args global , Args local )
{
Expand All @@ -47,7 +47,7 @@ public void getBfDetails( StorageInfo storageInfo ) throws Exception {
try{
setVolumeDetails( storageInfo );
}catch(Exception ee){
_log.error("Can't get volume details "+ee);
LOGGER.error("Can't get volume details " + ee);
}

}
Expand Down Expand Up @@ -87,7 +87,7 @@ private void setVolumeDetails( StorageInfo storageInfo )throws Exception {
error);
}

_log.info("Output : "+output);
LOGGER.info("Output : " + output);

String volNbf;
String volStat;
Expand Down Expand Up @@ -147,7 +147,7 @@ private void setBfDetails( StorageInfo storageInfo )throws Exception {
error);
}

_log.info("Output : "+output);
LOGGER.info("Output : " + output);

String tape;
String status;
Expand Down
Loading

0 comments on commit 56fc8af

Please sign in to comment.