Package edu.uga.cs.fluxbuster.db

Examples of edu.uga.cs.fluxbuster.db.DBInterface


   * @param startTime unix epoch in sec.
   * @return the list of recent flux 2LD's
   */
  private Set<String> loadRecentFluxDomains(long startTime) {
    Set<String> retval = new HashSet<String>();
    DBInterface iface = DBInterfaceFactory.loadDBInterface();
    DateTime startDateTime = new DateTime(startTime * 1000);
    for(int i = 1; i < 8; i++){
      Date prevdate = new Date(startDateTime.minusDays(i).getMillis());
      try{
        for(StoredDomainCluster fluxCluster: iface.getClusters(prevdate,
            ClusterClass.FLUX)){
          for(String domain : fluxCluster.getDomains()){
            retval.add(DomainNameUtils.extractEffective2LD(domain));
          }
        }
View Full Code Here


   * @param log_date the clustering run date
   * @throws Exception if the database interface could not be loaded.
   */
  public void storeClusters(List<DomainCluster> clusters,
      Date log_date) throws Exception {
    DBInterface dbiface = DBInterfaceFactory.loadDBInterface();
    if (dbiface == null) {
      throw new Exception("Could not load DB interface.");
    }
    if(log.isInfoEnabled()){
      log.info(this.getClass().getSimpleName() + " Started: "
          + Calendar.getInstance().getTime());
      log.info("Storing " + clusters.size() + " Clusters.");
    }
    dbiface.initClusterTables(log_date);
    dbiface.storeClusters(clusters, "SIE", log_date);
    if(log.isInfoEnabled()){
      log.info("Clusters stored.");
      log.info(this.getClass().getSimpleName() + " Finished: "
          + Calendar.getInstance().getTime());
    }
View Full Code Here

   * Store ip-based cluster similiarities in the database.
   *
   * @param sims the cluster similarities
   */
  public void storeIpClusterSimiliarities(List<ClusterSimilarity> sims){
    DBInterface db = DBInterfaceFactory.loadDBInterface();
    db.storeIpClusterSimilarities(sims);
  }
View Full Code Here

   * Store domainname-based cluster similiarities in the database.
   *
   * @param sims the cluster similarities
   */
  public void storeDomainnameClusterSimiliarities(List<ClusterSimilarity> sims){
    DBInterface db = DBInterfaceFactory.loadDBInterface();
    db.storeDomainnameClusterSimilarities(sims);   
  }
View Full Code Here

TOP

Related Classes of edu.uga.cs.fluxbuster.db.DBInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.