Permalink
Browse files

make CHECK_PERIOD_IN_MS field, static

  • Loading branch information...
1 parent b460b56 commit 0f4ce2fb68f6bb9957877a76a3a5bee80b4c5a8c @mebigfatguy mebigfatguy committed May 5, 2013
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/java/org/apache/cassandra/locator/YamlFileNetworkTopologySnitch.java
@@ -60,6 +60,14 @@
/** Logger. */
private static final Logger logger = LoggerFactory
.getLogger(YamlFileNetworkTopologySnitch.class);
+
+ /**
+ * How often to check the topology configuration file, in milliseconds; defaults to one minute.
+ */
+ private static final int CHECK_PERIOD_IN_MS = 60 * 1000;
+
+ /** Default name for the topology configuration file. */
+ private static final String DEFAULT_TOPOLOGY_CONFIG_FILENAME = "cassandra-topology.yaml";
/** Node data map, keyed by broadcast address. */
private volatile Map<InetAddress, NodeData> nodeDataMap;
@@ -70,17 +78,9 @@
/** Node data to fall back to when there is no match. */
private volatile NodeData defaultNodeData;
- /** Default name for the topology configuration file. */
- private static final String DEFAULT_TOPOLOGY_CONFIG_FILENAME = "cassandra-topology.yaml";
-
/** Name of the topology configuration file. */
private final String topologyConfigFilename;
- /**
- * How often to check the topology configuration file, in milliseconds; defaults to one minute.
- */
- private final int checkPeriodInMs = 60 * 1000;
-
/** True if the gossiper has been initialized. */
private volatile boolean gossiperInitialized = false;
@@ -127,7 +127,7 @@ protected void runMayThrow() throws ConfigurationException
}
};
ResourceWatcher.watch(topologyConfigFilename, runnable,
- checkPeriodInMs);
+ CHECK_PERIOD_IN_MS);
}
catch (final ConfigurationException e)
{

0 comments on commit 0f4ce2f

Please sign in to comment.