Ejemplo n.º 1
0
  /** Constructor. */
  public DatabaseEventQueue() {
    if (Debug.isLevelEnabled(Debug.OBJECT_LIFECYCLE))
      Debug.log(
          Debug.OBJECT_LIFECYCLE,
          "QUEUE OPERATION: Creating event queue of type ["
              + StringUtils.getClassName(this)
              + "] ...");

    queue = Collections.synchronizedList(new LinkedList());
  }
Ejemplo n.º 2
0
  /**
   * Get a human-readable description of the event queue.
   *
   * @return A description of the event queue.
   */
  public String describe() {
    StringBuffer sb = new StringBuffer();

    sb.append("Database event queue [");
    sb.append(StringUtils.getClassName(this));
    sb.append("], in-memory-event-count [");
    sb.append(queue.size());
    sb.append("], Event-load-batch-size [");
    sb.append(maxDatabaseEventLoadSize);
    sb.append("]");

    return (sb.toString());
  }