com.sun.jini.outrigger
Class ExpirationOpQueue

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.jini.outrigger.ExpirationOpQueue
All Implemented Interfaces:
Runnable

 class ExpirationOpQueue
extends Thread

Logs expiration of leases and asynchronously persists them to disk.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  boolean dead
          true if we should stop
private static Logger logger
          Logger for logging exceptions
private  LinkedList queue
          The queue of expirations to log
private  OutriggerServerImpl server
          The server we are working for
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ExpirationOpQueue(OutriggerServerImpl server)
          Create a new ExpirationOpQueue that will handle lease expiration logging for the specified server.
 
Method Summary
(package private)  void enqueue(Uuid cookie)
          Enqueue the logging of the expiration of the specified lease.
 void run()
           
(package private)  void terminate()
          Stop the queue
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dead

private boolean dead
true if we should stop


queue

private final LinkedList queue
The queue of expirations to log


server

private final OutriggerServerImpl server
The server we are working for


logger

private static final Logger logger
Logger for logging exceptions

Constructor Detail

ExpirationOpQueue

ExpirationOpQueue(OutriggerServerImpl server)
Create a new ExpirationOpQueue that will handle lease expiration logging for the specified server.

Parameters:
server - the OutriggerServerImpl to log for.
Method Detail

enqueue

void enqueue(Uuid cookie)
Enqueue the logging of the expiration of the specified lease.

Parameters:
cookie - The cookie of the lease that has expired.

terminate

void terminate()
Stop the queue


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.