Examples of DBInterface


Examples of de.timefinder.data.DBInterface

        }
    }

    private <T extends DBInterface> T getObject(Long id, Class<T> clazz) {
        Map<Long, DBInterface> simpleDao = simpleDaos.get(clazz);
        DBInterface obj = simpleDao.get(id);
        if (obj == null) {
            try {
                obj = clazz.newInstance();
                // obj.set(id) will be done in attach of the 'real dao'
                simpleDao.put(id, obj);
View Full Code Here

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

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

   * @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

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

   * 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

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

   * 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
Copyright © 2018 www.massapi.com. 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.