code: private com.datastax.driver.core.policies.ReconnectionPolicy getPolicy(ReconnectionPolicy policy, Properties props)
      {
          com.datastax.driver.core.policies.ReconnectionPolicy reconnectionPolicy = null;
          switch (policy)
          {
          case ConstantReconnectionPolicy:
              String property = props.getProperty("constantDelayMs");
              long constantDelayMs = property != null ? new Long(property) : 0l;
              reconnectionPolicy = new ConstantReconnectionPolicy(constantDelayMs);
              break;
  
          case ExponentialReconnectionPolicy:
              String baseDelayMsAsStr = props.getProperty("baseDelayMs");
              String maxDelayMsAsStr = props.getProperty("maxDelayMs");
              if (!StringUtils.isBlank(baseDelayMsAsStr) && !StringUtils.isBlank(maxDelayMsAsStr))
              {
                  long baseDelayMs = new Long(baseDelayMsAsStr);
                  long maxDelayMs = new Long(maxDelayMsAsStr);
                  reconnectionPolicy = new ExponentialReconnectionPolicy(baseDelayMs, maxDelayMs);
              }
              break;
  
          default:
              break;
          }
  
          return reconnectionPolicy;
      }
docs: Gets the policy.
  
  @param policy
  the policy
  @param props
  the props
  @return the policy