Package org.apache.log4j.scheduler

Examples of org.apache.log4j.scheduler.Scheduler


    if(this.repository == null) {
      throw new IllegalStateException(
      "DBAppender cannot function without a reference to its owning repository");
    }

    Scheduler scheduler = this.repository.getScheduler();
   
    scheduler.schedule(
        receiverJob, System.currentTimeMillis() + 500, refreshMillis);
  
  }
View Full Code Here


   */
  public void shutdown() {
    getLogger().info("removing receiverJob from the Scheduler.");

    if(this.repository != null) {
      Scheduler scheduler = repository.getScheduler();
      scheduler.delete(receiverJob);
    }
  }
View Full Code Here

        "CustomSQLDBReceiver cannot function without a reference to its owning repository");
      }
    
   
     
      Scheduler scheduler = this.repository.getScheduler();
     
      scheduler.schedule(
          customReceiverJob, System.currentTimeMillis() + 500, refreshMillis);

    }
View Full Code Here

     */
    public void shutdown() {
        getLogger().info("removing receiverJob from the Scheduler.");

        if(this.repository != null) {
          Scheduler scheduler = repository.getScheduler();
          scheduler.delete(customReceiverJob);
        }

        lastID = -1;
    }
View Full Code Here

   * Return this repository's own scheduler. The scheduler is lazily instantiated.
   * @return this repository's own scheduler.
   */
  public Scheduler getScheduler() {
    if(scheduler == null) {
      scheduler = new Scheduler();
      scheduler.setDaemon(true);
      scheduler.start();
    }
    return scheduler;
  }
View Full Code Here

  public void activateOptions() {
    if (connectionSource != null) {
      receiverJob = new DBReceiverJob(this);

      Scheduler scheduler = LogManager.getSchedulerInstance();
      scheduler.schedule(
        receiverJob, System.currentTimeMillis() + 500, refreshMillis);
    } else {
      throw new IllegalStateException(
        "DBAppender cannot function without a connection source");
    }
View Full Code Here

   * @see org.apache.log4j.plugins.Plugin#shutdown()
   */
  public void shutdown() {
    getLogger().info("removing receiverJob from the Scheduler.");

    Scheduler scheduler = LogManager.getSchedulerInstance();
    scheduler.delete(receiverJob);
  }
View Full Code Here

   *
   * @since 1.3
   */
  public static Scheduler getSchedulerInstance() {
    if(schedulerInstance == null) {
      schedulerInstance = new Scheduler();
      schedulerInstance.start();
    }
    return schedulerInstance;
  }
View Full Code Here

      }
    
   

      if (repository instanceof LoggerRepositoryEx) {
        Scheduler scheduler = ((LoggerRepositoryEx) repository).getScheduler();
     
        scheduler.schedule(
          customReceiverJob, System.currentTimeMillis() + 500, refreshMillis);
      }

    }
View Full Code Here

     */
    public void shutdown() {
        getLogger().info("removing receiverJob from the Scheduler.");

        if(this.repository instanceof LoggerRepositoryEx) {
          Scheduler scheduler = ((LoggerRepositoryEx) repository).getScheduler();
          scheduler.delete(customReceiverJob);
        }

        lastID = -1;
    }
View Full Code Here

TOP

Related Classes of org.apache.log4j.scheduler.Scheduler

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.