com.sun.jini.mercury
Class EventLogFactory

java.lang.Object
  extended by com.sun.jini.mercury.EventLogFactory

 class EventLogFactory
extends Object

This class serves as a factory for generating EventLogIterator objects. The iterator objects are cached so that subsequent calls for the same iterator return the same object.

Since:
1.1
Author:
Sun Microsystems, Inc.

Nested Class Summary
private static class EventLogFactory.EventLogIteratorImpl
          Private class which implements the EventLogIterator interface.
 
Field Summary
private  HashMap iterators
          Map that contains references to generated iterators
 
Constructor Summary
EventLogFactory()
           
 
Method Summary
 EventLogIterator iterator(Uuid uuid)
          Method to return the iterator object for the designated Uuid.
 EventLogIterator iterator(Uuid uuid, File logPath)
          Method to return the iterator object for the designated Uuid.
 void remove(Uuid uuid)
          Remove the EventLogIterator associated with the given Uuid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iterators

private HashMap iterators
Map that contains references to generated iterators

Constructor Detail

EventLogFactory

EventLogFactory()
Method Detail

iterator

public EventLogIterator iterator(Uuid uuid,
                                 File logPath)
Method to return the iterator object for the designated Uuid. The File argument determines where the persistence store will be maintained and is only used for the first instance of the iterator. (Note that upon recovery from a restart/crash the Uuid will already exist so the logPath arg will not be used.) Subsequent calls for the same Uuid will return the original object.


iterator

public EventLogIterator iterator(Uuid uuid)
Method to return the iterator object for the designated Uuid. Subsequent calls for the same Uuid will return the original object.


remove

public void remove(Uuid uuid)
Remove the EventLogIterator associated with the given Uuid. This is (presumably) called to flush an existing EventLogIterator whose storage location has changed. This way, the next call to iterator will produce a new object instead of returning the cached version.



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