net.sf.jour.rt.agent
Class AsyncEventWriter

java.lang.Object
  extended bynet.sf.jour.rt.agent.AsyncEventWriter
All Implemented Interfaces:
BulkEventLogger

public class AsyncEventWriter
extends java.lang.Object
implements BulkEventLogger

TODO Add docs Created on 02.12.2004 Contributing Author(s): Misha Lifschitz (Inital implementation) Vlad Skarzhevskyy (Inital implementation)

Version:
$Revision: 1.8 $ ($Author: vlads $) $Date: 2004/12/12 02:00:01 $
Author:
vlads

Nested Class Summary
(package private)  class AsyncEventWriter.Dispatcher
           
(package private)  class AsyncEventWriter.QueueItem
           
 
Field Summary
static int DEFAULT_DISPATCHER_BUFFER
           
static int DEFAULT_DISPATCHER_THREADS
           
(package private)  int dispatcherCnt
           
(package private)  java.util.Hashtable dispatchers
          There could be more than one thread in each Dispatcher
(package private)  AsyncEventWriter.Dispatcher lastUsed
           
protected static org.apache.log4j.Logger log
           
(package private)  int maxThreads
           
 
Constructor Summary
AsyncEventWriter()
           
 
Method Summary
 void close()
          Close All and be ready to exit.
 void close(java.lang.Thread key)
          Close the Queue for this thread.
 void dispatch(java.lang.Thread key, Queue eventQueue)
           
 boolean isClose()
           
 boolean isThreadable()
           
 void recive(java.lang.Thread key, Queue eventQueue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

DEFAULT_DISPATCHER_THREADS

public static final int DEFAULT_DISPATCHER_THREADS
See Also:
Constant Field Values

DEFAULT_DISPATCHER_BUFFER

public static final int DEFAULT_DISPATCHER_BUFFER
See Also:
Constant Field Values

dispatchers

java.util.Hashtable dispatchers
There could be more than one thread in each Dispatcher


dispatcherCnt

int dispatcherCnt

lastUsed

AsyncEventWriter.Dispatcher lastUsed

maxThreads

int maxThreads
Constructor Detail

AsyncEventWriter

public AsyncEventWriter()
Method Detail

isThreadable

public boolean isThreadable()

recive

public void recive(java.lang.Thread key,
                   Queue eventQueue)
Specified by:
recive in interface BulkEventLogger

dispatch

public void dispatch(java.lang.Thread key,
                     Queue eventQueue)

close

public void close(java.lang.Thread key)
Close the Queue for this thread.

Specified by:
close in interface BulkEventLogger

close

public void close()
Close All and be ready to exit.

Specified by:
close in interface BulkEventLogger

isClose

public boolean isClose()
Specified by:
isClose in interface BulkEventLogger


Copyright © 2004 sourceforge. All Rights Reserved.