code: private Predicate<com.datastax.driver.core.Host> getHostFilterPredicate(String hostFilterPolicy)
      {
          Predicate<com.datastax.driver.core.Host> predicate = null;
          Method getter = null;
          Class<?> hostFilterClazz = null;
          try
          {
  
              hostFilterClazz = Class.forName(hostFilterPolicy);
              getter = hostFilterClazz.getDeclaredMethod(GET_INSTANCE);
  
              predicate = (Predicate<com.datastax.driver.core.Host>) getter.invoke(KunderaCoreUtils
                      .createNewInstance(hostFilterClazz));
          }
          catch (ClassNotFoundException e)
          {
              logger.error(e.getMessage());
              throw new KunderaException("Please make sure class " + hostFilterPolicy
                      + " set in property file exists in classpath " + e.getMessage());
          }
          catch (IllegalAccessException e)
          {
              logger.error(e.getMessage());
              throw new KunderaException("Method " + getter.getName() + " must be declared public " + e.getMessage());
          }
          catch (NoSuchMethodException e)
          {
              logger.error(e.getMessage());
              throw new KunderaException("Please make sure getter method of " + hostFilterClazz.getSimpleName()
                      + " is named \"getInstance()\"");
          }
          catch (InvocationTargetException e)
          {
              logger.error(e.getMessage());
              throw new KunderaException("Error while executing \"getInstance()\" method of Class "
                      + hostFilterClazz.getSimpleName() + ": " + e.getMessage());
          }
          catch (SecurityException e)
          {
              logger.error(e.getMessage());
              throw new KunderaException("Encountered security exception while accessing the method: "
                      + "\"getInstance()\"" + e.getMessage());
          }
          return predicate;
      }
docs: Gets the host filter predicate.
  
  @param hostFilterPolicy
  the host filter policy
  @return the host filter predicate