Package no.priv.garshol.duke

Examples of no.priv.garshol.duke.DukeException


      iwriter.close();
      directory.close();
      if (reader != null)
        reader.close();
    } catch (IOException e) {
      throw new DukeException(e);
    }
  }
View Full Code Here


    try {
      openIndexes(overwrite);
      openSearchers();
      initSpatial();
    } catch (IOException e) {
      throw new DukeException(e);
    }
  }
View Full Code Here

        if (!overwrite) {
          // the index was not there, so make a new one
          directory = null; // ensure we really do try again
          openIndexes(true);
        } else
          throw new DukeException(e);
      } catch (IOException e) {
        throw new DukeException(e);
      }
    }
  }
View Full Code Here

          String term = attr.toString();
          Query termQuery = new TermQuery(new Term(fieldName, term));
          searchQuery.add(termQuery, Occur.SHOULD);
        }
      } catch (IOException e) {
        throw new DukeException("Error parsing input string '" + value + "' " +
                                "in field " + fieldName);
      }
    }

    return searchQuery;
View Full Code Here

        if (boost != null)
          termQuery.setBoost(boost);
        parent.add(termQuery, required ? Occur.MUST : Occur.SHOULD);
      }
    } catch (IOException e) {
      throw new DukeException("Error parsing input string '"+value+"' "+
                              "in field " + fieldName);
    }
  }
View Full Code Here

              limit = Math.max((int) (average() * SEARCH_EXPANSION_FACTOR), limit);
            }
          }
        }
      } catch (IOException e) {
        throw new DukeException(e);
      }
      return matches;
    }
View Full Code Here

    try {
      InitialContext ctx = new InitialContext();
      mgr = (TimerManager) ctx.lookup(path);
    }
    catch (Exception e) {
      throw new DukeException(e);
    }
  }
View Full Code Here

    // don't need to do anything
  }
 
  public void spawnThread(DukeController controller, int check_interval) {
    if (this.controller != null)
      throw new DukeException("Timer thread already running!");
   
    this.controller = controller;
    this.check_interval = check_interval * 1000; // convert to ms
    keep_running = true;

View Full Code Here

            logger.error("Couldn't close processor", e2);
        }
      if (linkdb != null)
        linkdb.close();

      throw new DukeException(e); // we failed, so signal that
    }
  }
View Full Code Here

    super.init(config);

    // load properties
    Properties props = loadPropertiesFromClassPath("duke.properties");
    if (props == null)
      throw new DukeException("Cannot find 'duke.properties' on classpath");

    check_interval = Integer.parseInt(get(props, "duke.check-interval"));
   
    // instantiate main objects
    this.controller = new DukeController(props);
View Full Code Here

TOP

Related Classes of no.priv.garshol.duke.DukeException

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.