<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!-- NewPage --> | |
<html lang="en"> | |
<head> | |
<!-- Generated by javadoc (1.8.0) on Sun Aug 28 20:42:50 EST 2016 --> | |
<title>PersistentEventLog (Apache River v3.0.0 API Documentation (internals))</title> | |
<meta name="date" content="2016-08-28"> | |
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> | |
<script type="text/javascript" src="../../../../script.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"><!-- | |
try { | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="PersistentEventLog (Apache River v3.0.0 API Documentation (internals))"; | |
} | |
} | |
catch(err) { | |
} | |
//--> | |
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":9,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":9,"i15":10,"i16":10,"i17":10,"i18":10,"i19":9,"i20":10,"i21":9,"i22":10,"i23":10}; | |
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; | |
var altColor = "altColor"; | |
var rowColor = "rowColor"; | |
var tableTab = "tableTab"; | |
var activeTableTab = "activeTableTab"; | |
</script> | |
<noscript> | |
<div>JavaScript is disabled on your browser.</div> | |
</noscript> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<div class="topNav"><a name="navbar.top"> | |
<!-- --> | |
</a> | |
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> | |
<a name="navbar.top.firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../../overview-summary.html">Overview</a></li> | |
<li><a href="package-summary.html">Package</a></li> | |
<li class="navBarCell1Rev">Class</li> | |
<li><a href="class-use/PersistentEventLog.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../../index-all.html">Index</a></li> | |
<li><a href="../../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li><a href="../../../../org/apache/river/mercury/NonActivatableMercuryImpl.html" title="class in org.apache.river.mercury"><span class="typeNameLink">Prev Class</span></a></li> | |
<li><a href="../../../../org/apache/river/mercury/ProxyUtil.html" title="class in org.apache.river.mercury"><span class="typeNameLink">Next Class</span></a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../../index.html?org/apache/river/mercury/PersistentEventLog.html" target="_top">Frames</a></li> | |
<li><a href="PersistentEventLog.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_top"> | |
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_top"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<div> | |
<ul class="subNavList"> | |
<li>Summary: </li> | |
<li>Nested | </li> | |
<li><a href="#field.summary">Field</a> | </li> | |
<li><a href="#constructor.summary">Constr</a> | </li> | |
<li><a href="#method.summary">Method</a></li> | |
</ul> | |
<ul class="subNavList"> | |
<li>Detail: </li> | |
<li><a href="#field.detail">Field</a> | </li> | |
<li><a href="#constructor.detail">Constr</a> | </li> | |
<li><a href="#method.detail">Method</a></li> | |
</ul> | |
</div> | |
<a name="skip.navbar.top"> | |
<!-- --> | |
</a></div> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<div class="header"> | |
<div class="subTitle">org.apache.river.mercury</div> | |
<h2 title="Class PersistentEventLog" class="title">Class PersistentEventLog</h2> | |
</div> | |
<div class="contentContainer"> | |
<ul class="inheritance"> | |
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> | |
<li> | |
<ul class="inheritance"> | |
<li>org.apache.river.mercury.PersistentEventLog</li> | |
</ul> | |
</li> | |
</ul> | |
<div class="description"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<dl> | |
<dt>All Implemented Interfaces:</dt> | |
<dd><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></dd> | |
</dl> | |
<hr> | |
<br> | |
<pre>class <span class="typeNameLabel">PersistentEventLog</span> | |
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> | |
implements <a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></pre> | |
<div class="block">Class that implements the interface for an <tt>EventLog</tt>. | |
This class encapsulates the details of reading/writing events from/to | |
some underlying persistence mechanism. | |
This class makes certain assumptions. First, the <tt>next</tt> and | |
<tt>remove</tt> methods are intended to be called in pairs. If | |
<tt>remove</tt> is not called, then subsequent calls to <tt>next</tt> | |
will attempt to return the same object. Calling <tt>remove</tt> | |
essentially advances the read pointer to the next object, if any. | |
Second, if any <tt>IOExceptions</tt> are encountered during the reading | |
or writing of an event the associated read/write pointer is advanced | |
past the offending event. This means that events can be lost if I/O | |
errors are encountered.</div> | |
<dl> | |
<dt><span class="simpleTagLabel">Since:</span></dt> | |
<dd>2.0</dd> | |
<dt><span class="simpleTagLabel">Author:</span></dt> | |
<dd>Sun Microsystems, Inc.</dd> | |
</dl> | |
</li> | |
</ul> | |
</div> | |
<div class="summary"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="field.summary"> | |
<!-- --> | |
</a> | |
<h3>Field Summary</h3> | |
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> | |
<caption><span>Fields</span><span class="tabEnd"> </span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Modifier and Type</th> | |
<th class="colLast" scope="col">Field and Description</th> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private boolean</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#closed">closed</a></span></code> | |
<div class="block">Flag that is used to determine whether or not this object | |
has been closed.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#controlFile">controlFile</a></span></code> | |
<div class="block">The <tt>File</tt> object that will maintain the control data for | |
for this <tt>EventLog</tt>.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private static int</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#CTLBLOCK_LEN">CTLBLOCK_LEN</a></span></code> | |
<div class="block">Size of control data file: 4 longs * 8 bytes per long</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private byte[]</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#ctlbuf">ctlbuf</a></span></code> | |
<div class="block">The in memory buffer that holds the control data</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#CTLFILE_SUFFIX">CTLFILE_SUFFIX</a></span></code> | |
<div class="block">File suffix for the control file</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private static boolean</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#debugState">debugState</a></span></code> </td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private static long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#DEFAULT_EVENTS_PER_LOGFILE">DEFAULT_EVENTS_PER_LOGFILE</a></span></code> | |
<div class="block">Default number of events per log file, if not overriden by the user</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>(package private) static int</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#DEFAULT_STREAM_POOL_SIZE">DEFAULT_STREAM_POOL_SIZE</a></span></code> | |
<div class="block">Default size for the stream pool, if not overriden by the user</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private <a href="../../../../org/apache/river/mercury/EventReader.html" title="class in org.apache.river.mercury">EventReader</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#eventReader">eventReader</a></span></code> | |
<div class="block">The <tt>EventReader</tt> used to retrieve events.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private static long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#eventsPerLogFile">eventsPerLogFile</a></span></code> | |
<div class="block">Maximum number of event objects per log file.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private <a href="../../../../org/apache/river/mercury/EventWriter.html" title="class in org.apache.river.mercury">EventWriter</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#eventWriter">eventWriter</a></span></code> | |
<div class="block">The <tt>EventWriter</tt> used to store events</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private boolean</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#initialized">initialized</a></span></code> | |
<div class="block">Flag that is used to determine whether or not this object | |
has been initialized.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#logDir">logDir</a></span></code> | |
<div class="block">The <tt>File</tt> object of the event persistence directory</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#LOGFILE_SUFFIX">LOGFILE_SUFFIX</a></span></code> | |
<div class="block">File suffix for the log files</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private static int</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#maxPoolSize">maxPoolSize</a></span></code> | |
<div class="block">Maximum limit for the number of concurrent <tt>LogStream</tt>s | |
that this pool will concurrently manage.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#nextReadPos">nextReadPos</a></span></code> | |
<div class="block">The read offset of the next event.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#persistenceLogger">persistenceLogger</a></span></code> | |
<div class="block"><tt>Logger</tt> used for persistence-related debugging messages</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#rcount">rcount</a></span></code> | |
<div class="block">The current number of read events.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#rpos">rpos</a></span></code> | |
<div class="block">The read offset into the current "read" log of the | |
"last read" object.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private static <a href="../../../../org/apache/river/mercury/StreamPool.html" title="class in org.apache.river.mercury">StreamPool</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#streamPool">streamPool</a></span></code> | |
<div class="block">The <tt>StreamPool</tt> reference to be used for all | |
instances of <tt>EventLog</tt>.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private <a href="../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#uuid">uuid</a></span></code> | |
<div class="block">The associated <tt>Uuid</tt> for this <tt>EventLog</tt>.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><code>private long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#wcount">wcount</a></span></code> | |
<div class="block">The current number of written events.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><code>private long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#wpos">wpos</a></span></code> | |
<div class="block">The current write offset into the current "write" log.</div> | |
</td> | |
</tr> | |
</table> | |
</li> | |
</ul> | |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="constructor.summary"> | |
<!-- --> | |
</a> | |
<h3>Constructor Summary</h3> | |
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> | |
<caption><span>Constructors</span><span class="tabEnd"> </span></caption> | |
<tr> | |
<th class="colOne" scope="col">Constructor and Description</th> | |
</tr> | |
<tr class="altColor"> | |
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#PersistentEventLog-net.jini.id.Uuid-java.io.File-">PersistentEventLog</a></span>(<a href="../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a> uuid, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> logDir)</code> | |
<div class="block">Simple constructor that takes a <tt>Uuid</tt> argument | |
and a <tt>File</tt> argument.</div> | |
</td> | |
</tr> | |
</table> | |
</li> | |
</ul> | |
<!-- ========== METHOD SUMMARY =========== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="method.summary"> | |
<!-- --> | |
</a> | |
<h3>Method Summary</h3> | |
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> | |
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Modifier and Type</th> | |
<th class="colLast" scope="col">Method and Description</th> | |
</tr> | |
<tr id="i0" class="altColor"> | |
<td class="colFirst"><code>void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#add-net.jini.core.event.RemoteEvent-">add</a></span>(<a href="../../../../net/jini/core/event/RemoteEvent.html" title="class in net.jini.core.event">RemoteEvent</a> event)</code> | |
<div class="block">Writes the given <tt>RemoteEvent</tt> to the underlying | |
storage mechanism, if possible.</div> | |
</td> | |
</tr> | |
<tr id="i1" class="rowColor"> | |
<td class="colFirst"><code>private void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#assertInvariants--">assertInvariants</a></span>()</code> | |
<div class="block">Utility method for asserting that the object invariants are valid.</div> | |
</td> | |
</tr> | |
<tr id="i2" class="altColor"> | |
<td class="colFirst"><code>void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#close--">close</a></span>()</code> | |
<div class="block">Close this log and release any associated runtime resources.</div> | |
</td> | |
</tr> | |
<tr id="i3" class="rowColor"> | |
<td class="colFirst"><code>void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#delete--">delete</a></span>()</code> | |
<div class="block">Delete associated storage resources for this log.</div> | |
</td> | |
</tr> | |
<tr id="i4" class="altColor"> | |
<td class="colFirst"><code>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#getControlFile--">getControlFile</a></span>()</code> | |
<div class="block">Utility method for returning the <tt>File</tt> that contains the | |
state information for this log.</div> | |
</td> | |
</tr> | |
<tr id="i5" class="rowColor"> | |
<td class="colFirst"><code>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#getLogFile-long-">getLogFile</a></span>(long lognum)</code> | |
<div class="block">Utility method for returning the <tt>File</tt> associated with the | |
given <tt>lognum</tt>.</div> | |
</td> | |
</tr> | |
<tr id="i6" class="altColor"> | |
<td class="colFirst"><code>private static long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#getLogNum-long-">getLogNum</a></span>(long count)</code> | |
<div class="block">Utility method for returning the log file number for the given | |
(event) <tt>count</tt>.</div> | |
</td> | |
</tr> | |
<tr id="i7" class="rowColor"> | |
<td class="colFirst"><code>void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#init--">init</a></span>()</code> | |
<div class="block">Initializes the state of this <tt>EventLog</tt> object.</div> | |
</td> | |
</tr> | |
<tr id="i8" class="altColor"> | |
<td class="colFirst"><code>boolean</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#isEmpty--">isEmpty</a></span>()</code> | |
<div class="block">Returns <tt>true</tt> if this log contains no events and | |
false otherwise.</div> | |
</td> | |
</tr> | |
<tr id="i9" class="rowColor"> | |
<td class="colFirst"><code>void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#moveAhead-java.lang.Object-">moveAhead</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> cookie)</code> | |
<div class="block">Effectively removes the last set of read events from the log.</div> | |
</td> | |
</tr> | |
<tr id="i10" class="altColor"> | |
<td class="colFirst"><code><a href="../../../../net/jini/core/event/RemoteEvent.html" title="class in net.jini.core.event">RemoteEvent</a></code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#next--">next</a></span>()</code> | |
<div class="block">Return the next <tt>RemoteEvent</tt> to be read.</div> | |
</td> | |
</tr> | |
<tr id="i11" class="rowColor"> | |
<td class="colFirst"><code>private long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#nextReadAheadLog-long-">nextReadAheadLog</a></span>(long readCount)</code> | |
<div class="block">Advance the temporary "read" state to the next available log.</div> | |
</td> | |
</tr> | |
<tr id="i12" class="altColor"> | |
<td class="colFirst"><code>private void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#nextReadLog--">nextReadLog</a></span>()</code> | |
<div class="block">Advance the "read" state to the next available log.</div> | |
</td> | |
</tr> | |
<tr id="i13" class="rowColor"> | |
<td class="colFirst"><code>private void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#nextWriteLog--">nextWriteLog</a></span>()</code> | |
<div class="block">Advance the "write" state to the next available log.</div> | |
</td> | |
</tr> | |
<tr id="i14" class="altColor"> | |
<td class="colFirst"><code>private static void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#packLong-long-byte:A-int-">packLong</a></span>(long val, | |
byte[] b, | |
int off)</code> | |
<div class="block">Utility method for packing a <tt>long</tt> into a <tt>byte</tt> array.</div> | |
</td> | |
</tr> | |
<tr id="i15" class="rowColor"> | |
<td class="colFirst"><code>private void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#printControlData-java.util.logging.Logger-java.lang.String-">printControlData</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a> logger, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg)</code> | |
<div class="block">Output state information to the given <tt>Logger</tt>.</div> | |
</td> | |
</tr> | |
<tr id="i16" class="altColor"> | |
<td class="colFirst"><code><a href="../../../../org/apache/river/mercury/RemoteEventData.html" title="class in org.apache.river.mercury">RemoteEventData</a>[]</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#readAhead-int-">readAhead</a></span>(int maxEvents)</code> | |
<div class="block">Return an array of <tt>RemoteEventData</tt> with a limit of | |
<tt>maxEvents</tt> elements.</div> | |
</td> | |
</tr> | |
<tr id="i17" class="rowColor"> | |
<td class="colFirst"><code>private void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#readControlFile--">readControlFile</a></span>()</code> | |
<div class="block">Read state information from the underlying store.</div> | |
</td> | |
</tr> | |
<tr id="i18" class="altColor"> | |
<td class="colFirst"><code>void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#remove--">remove</a></span>()</code> | |
<div class="block">Effectively removes the last read event from the log.</div> | |
</td> | |
</tr> | |
<tr id="i19" class="rowColor"> | |
<td class="colFirst"><code>private static void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#removeDir-java.io.File-">removeDir</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> logDir)</code> | |
<div class="block">Attempt to delete the associated event log persistence directory.</div> | |
</td> | |
</tr> | |
<tr id="i20" class="altColor"> | |
<td class="colFirst"><code>private void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#stateCheck--">stateCheck</a></span>()</code> | |
<div class="block">Asserts that the log is in a valid state.</div> | |
</td> | |
</tr> | |
<tr id="i21" class="rowColor"> | |
<td class="colFirst"><code>private static long</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#unpackLong-byte:A-int-">unpackLong</a></span>(byte[] b, | |
int off)</code> | |
<div class="block">Utility method for unpacking a <tt>long</tt> from a <tt>byte</tt> array.</div> | |
</td> | |
</tr> | |
<tr id="i22" class="altColor"> | |
<td class="colFirst"><code>private boolean</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#verifyInvariants--">verifyInvariants</a></span>()</code> | |
<div class="block">Utility method for checking if the object invariants are valid.</div> | |
</td> | |
</tr> | |
<tr id="i23" class="rowColor"> | |
<td class="colFirst"><code>private void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/river/mercury/PersistentEventLog.html#writeControlFile--">writeControlFile</a></span>()</code> | |
<div class="block">Write state information to the underlying store.</div> | |
</td> | |
</tr> | |
</table> | |
<ul class="blockList"> | |
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> | |
<!-- --> | |
</a> | |
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> | |
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> | |
</ul> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</div> | |
<div class="details"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<!-- ============ FIELD DETAIL =========== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="field.detail"> | |
<!-- --> | |
</a> | |
<h3>Field Detail</h3> | |
<a name="persistenceLogger"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>persistenceLogger</h4> | |
<pre>private static final <a href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a> persistenceLogger</pre> | |
<div class="block"><tt>Logger</tt> used for persistence-related debugging messages</div> | |
</li> | |
</ul> | |
<a name="CTLBLOCK_LEN"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>CTLBLOCK_LEN</h4> | |
<pre>private static final int CTLBLOCK_LEN</pre> | |
<div class="block">Size of control data file: 4 longs * 8 bytes per long</div> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.CTLBLOCK_LEN">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="CTLFILE_SUFFIX"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>CTLFILE_SUFFIX</h4> | |
<pre>private static final <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CTLFILE_SUFFIX</pre> | |
<div class="block">File suffix for the control file</div> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.CTLFILE_SUFFIX">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="LOGFILE_SUFFIX"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>LOGFILE_SUFFIX</h4> | |
<pre>private static final <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LOGFILE_SUFFIX</pre> | |
<div class="block">File suffix for the log files</div> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.LOGFILE_SUFFIX">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="DEFAULT_EVENTS_PER_LOGFILE"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>DEFAULT_EVENTS_PER_LOGFILE</h4> | |
<pre>private static final long DEFAULT_EVENTS_PER_LOGFILE</pre> | |
<div class="block">Default number of events per log file, if not overriden by the user</div> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.DEFAULT_EVENTS_PER_LOGFILE">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="eventsPerLogFile"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>eventsPerLogFile</h4> | |
<pre>private static final long eventsPerLogFile</pre> | |
<div class="block">Maximum number of event objects per log file. The | |
default is used unless overridden by <tt>eventsPerLogProperty</tt>.</div> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.eventsPerLogFile">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="DEFAULT_STREAM_POOL_SIZE"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>DEFAULT_STREAM_POOL_SIZE</h4> | |
<pre>static final int DEFAULT_STREAM_POOL_SIZE</pre> | |
<div class="block">Default size for the stream pool, if not overriden by the user</div> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.DEFAULT_STREAM_POOL_SIZE">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="maxPoolSize"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>maxPoolSize</h4> | |
<pre>private static final int maxPoolSize</pre> | |
<div class="block">Maximum limit for the number of concurrent <tt>LogStream</tt>s | |
that this pool will concurrently manage. The | |
default is used unless overridden by <tt>streamPoolSizeProperty</tt>.</div> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.maxPoolSize">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="streamPool"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>streamPool</h4> | |
<pre>private static final <a href="../../../../org/apache/river/mercury/StreamPool.html" title="class in org.apache.river.mercury">StreamPool</a> streamPool</pre> | |
<div class="block">The <tt>StreamPool</tt> reference to be used for all | |
instances of <tt>EventLog</tt>.</div> | |
</li> | |
</ul> | |
<a name="uuid"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>uuid</h4> | |
<pre>private <a href="../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a> uuid</pre> | |
<div class="block">The associated <tt>Uuid</tt> for this <tt>EventLog</tt>.</div> | |
</li> | |
</ul> | |
<a name="wcount"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>wcount</h4> | |
<pre>private long wcount</pre> | |
<div class="block">The current number of written events.</div> | |
</li> | |
</ul> | |
<a name="rcount"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>rcount</h4> | |
<pre>private long rcount</pre> | |
<div class="block">The current number of read events.</div> | |
</li> | |
</ul> | |
<a name="wpos"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>wpos</h4> | |
<pre>private long wpos</pre> | |
<div class="block">The current write offset into the current "write" log.</div> | |
</li> | |
</ul> | |
<a name="rpos"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>rpos</h4> | |
<pre>private long rpos</pre> | |
<div class="block">The read offset into the current "read" log of the | |
"last read" object.</div> | |
</li> | |
</ul> | |
<a name="nextReadPos"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>nextReadPos</h4> | |
<pre>private long nextReadPos</pre> | |
<div class="block">The read offset of the next event. This gets updated to | |
<tt>rpos</tt> once <tt>remove</tt> is called (indicating | |
that the last event read was successful).</div> | |
</li> | |
</ul> | |
<a name="eventReader"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>eventReader</h4> | |
<pre>private <a href="../../../../org/apache/river/mercury/EventReader.html" title="class in org.apache.river.mercury">EventReader</a> eventReader</pre> | |
<div class="block">The <tt>EventReader</tt> used to retrieve events.</div> | |
</li> | |
</ul> | |
<a name="eventWriter"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>eventWriter</h4> | |
<pre>private <a href="../../../../org/apache/river/mercury/EventWriter.html" title="class in org.apache.river.mercury">EventWriter</a> eventWriter</pre> | |
<div class="block">The <tt>EventWriter</tt> used to store events</div> | |
</li> | |
</ul> | |
<a name="logDir"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>logDir</h4> | |
<pre>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> logDir</pre> | |
<div class="block">The <tt>File</tt> object of the event persistence directory</div> | |
</li> | |
</ul> | |
<a name="controlFile"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>controlFile</h4> | |
<pre>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> controlFile</pre> | |
<div class="block">The <tt>File</tt> object that will maintain the control data for | |
for this <tt>EventLog</tt>.</div> | |
</li> | |
</ul> | |
<a name="ctlbuf"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>ctlbuf</h4> | |
<pre>private byte[] ctlbuf</pre> | |
<div class="block">The in memory buffer that holds the control data</div> | |
</li> | |
</ul> | |
<a name="initialized"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>initialized</h4> | |
<pre>private boolean initialized</pre> | |
<div class="block">Flag that is used to determine whether or not this object | |
has been initialized.</div> | |
</li> | |
</ul> | |
<a name="closed"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>closed</h4> | |
<pre>private boolean closed</pre> | |
<div class="block">Flag that is used to determine whether or not this object | |
has been closed.</div> | |
</li> | |
</ul> | |
<a name="debugState"> | |
<!-- --> | |
</a> | |
<ul class="blockListLast"> | |
<li class="blockList"> | |
<h4>debugState</h4> | |
<pre>private static final boolean debugState</pre> | |
<dl> | |
<dt><span class="seeLabel">See Also:</span></dt> | |
<dd><a href="../../../../constant-values.html#org.apache.river.mercury.PersistentEventLog.debugState">Constant Field Values</a></dd> | |
</dl> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="constructor.detail"> | |
<!-- --> | |
</a> | |
<h3>Constructor Detail</h3> | |
<a name="PersistentEventLog-net.jini.id.Uuid-java.io.File-"> | |
<!-- --> | |
</a> | |
<ul class="blockListLast"> | |
<li class="blockList"> | |
<h4>PersistentEventLog</h4> | |
<pre>PersistentEventLog(<a href="../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a> uuid, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> logDir)</pre> | |
<div class="block">Simple constructor that takes a <tt>Uuid</tt> argument | |
and a <tt>File</tt> argument. These arguments are simply | |
assigned to the appropriate internal fields.</div> | |
<dl> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any of the arguments are null</dd> | |
</dl> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
<!-- ============ METHOD DETAIL ========== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="method.detail"> | |
<!-- --> | |
</a> | |
<h3>Method Detail</h3> | |
<a name="init--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>init</h4> | |
<pre>public void init() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#init--">EventLog</a></code></span></div> | |
<div class="block">Initializes the state of this <tt>EventLog</tt> object. | |
The required functionality can potentially throw an | |
<tt>IOException</tt> and has therefore been separated from | |
from object construction.</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#init--">init</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="add-net.jini.core.event.RemoteEvent-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>add</h4> | |
<pre>public void add(<a href="../../../../net/jini/core/event/RemoteEvent.html" title="class in net.jini.core.event">RemoteEvent</a> event) | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#add-net.jini.core.event.RemoteEvent-">EventLog</a></code></span></div> | |
<div class="block">Writes the given <tt>RemoteEvent</tt> to the underlying | |
storage mechanism, if possible. If an <tt>IOException</tt> | |
occurs, then the write cannot be guaranteed.</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#add-net.jini.core.event.RemoteEvent-">add</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="next--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>next</h4> | |
<pre>public <a href="../../../../net/jini/core/event/RemoteEvent.html" title="class in net.jini.core.event">RemoteEvent</a> next() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#next--">EventLog</a></code></span></div> | |
<div class="block">Return the next <tt>RemoteEvent</tt> to be read. Note that | |
<tt>next</tt> is meant to be used in conjunction with | |
<tt>remove</tt>. Subsequent calls to <tt>next</tt> will | |
return the same event until <tt>remove</tt> is called, which | |
actually updates the read pointer to the next event (indicating | |
that the previously read event was successfully processed).</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#next--">next</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - if a class for the serialized | |
object could not be found</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="readAhead-int-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>readAhead</h4> | |
<pre>public <a href="../../../../org/apache/river/mercury/RemoteEventData.html" title="class in org.apache.river.mercury">RemoteEventData</a>[] readAhead(int maxEvents) | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#readAhead-int-">EventLog</a></code></span></div> | |
<div class="block">Return an array of <tt>RemoteEventData</tt> with a limit of | |
<tt>maxEvents</tt> elements. Note that | |
<tt>readAhead</tt> is meant to be used in conjunction with | |
<tt>moveAhead</tt>. Subsequent calls to <tt>readAhead</tt> with | |
the same argument value will return the same set of events until | |
<tt>moveAhead</tt> is called, which | |
actually updates the read pointer to the next unread event (indicating | |
that the previously read events were successfully processed).</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#readAhead-int-">readAhead</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>maxEvents</code> - maximum number of events/elements to return</dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - if a class for the serialized | |
object could not be found</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="isEmpty--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>isEmpty</h4> | |
<pre>public boolean isEmpty() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#isEmpty--">EventLog</a></code></span></div> | |
<div class="block">Returns <tt>true</tt> if this log contains no events and | |
false otherwise.</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#isEmpty--">isEmpty</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="remove--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>remove</h4> | |
<pre>public void remove() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#remove--">EventLog</a></code></span></div> | |
<div class="block">Effectively removes the last read event from the log. | |
It does this by advancing the read pointer to the | |
next available event, if any.</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#remove--">remove</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="moveAhead-java.lang.Object-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>moveAhead</h4> | |
<pre>public void moveAhead(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> cookie) | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#moveAhead-java.lang.Object-">EventLog</a></code></span></div> | |
<div class="block">Effectively removes the last set of read events from the log. | |
It does this by advancing the read pointer to the | |
next available event after the event associated with the provided | |
cookie object.</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#moveAhead-java.lang.Object-">moveAhead</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>cookie</code> - object associated with event to read past. This object | |
should have been obtained from a call to | |
<code>getCookie()</code> on a <code>RemoteEventData</code> object | |
obtained from a call to <code>readAhead</code> on this event log.</dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there was a problem advancing the read pointer.</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="close--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>close</h4> | |
<pre>public void close() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#close--">EventLog</a></code></span></div> | |
<div class="block">Close this log and release any associated runtime resources.</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#close--">close</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="delete--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>delete</h4> | |
<pre>public void delete() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/river/mercury/EventLog.html#delete--">EventLog</a></code></span></div> | |
<div class="block">Delete associated storage resources for this log.</div> | |
<dl> | |
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/EventLog.html#delete--">delete</a></code> in interface <code><a href="../../../../org/apache/river/mercury/EventLog.html" title="interface in org.apache.river.mercury">EventLog</a></code></dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="removeDir-java.io.File-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>removeDir</h4> | |
<pre>private static void removeDir(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> logDir)</pre> | |
<div class="block">Attempt to delete the associated event log persistence directory.</div> | |
</li> | |
</ul> | |
<a name="nextReadLog--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>nextReadLog</h4> | |
<pre>private void nextReadLog()</pre> | |
<div class="block">Advance the "read" state to the next available log.</div> | |
</li> | |
</ul> | |
<a name="nextReadAheadLog-long-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>nextReadAheadLog</h4> | |
<pre>private long nextReadAheadLog(long readCount)</pre> | |
<div class="block">Advance the temporary "read" state to the next available log.</div> | |
</li> | |
</ul> | |
<a name="nextWriteLog--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>nextWriteLog</h4> | |
<pre>private void nextWriteLog()</pre> | |
<div class="block">Advance the "write" state to the next available log.</div> | |
</li> | |
</ul> | |
<a name="printControlData-java.util.logging.Logger-java.lang.String-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>printControlData</h4> | |
<pre>private void printControlData(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a> logger, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg)</pre> | |
<div class="block">Output state information to the given <tt>Logger</tt>. | |
This is intended for debugging purposes only.</div> | |
</li> | |
</ul> | |
<a name="writeControlFile--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>writeControlFile</h4> | |
<pre>private void writeControlFile() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block">Write state information to the underlying store.</div> | |
<dl> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="readControlFile--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>readControlFile</h4> | |
<pre>private void readControlFile() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block">Read state information from the underlying store.</div> | |
<dl> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="packLong-long-byte:A-int-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>packLong</h4> | |
<pre>private static void packLong(long val, | |
byte[] b, | |
int off)</pre> | |
<div class="block">Utility method for packing a <tt>long</tt> into a <tt>byte</tt> array.</div> | |
</li> | |
</ul> | |
<a name="unpackLong-byte:A-int-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>unpackLong</h4> | |
<pre>private static long unpackLong(byte[] b, | |
int off)</pre> | |
<div class="block">Utility method for unpacking a <tt>long</tt> from a <tt>byte</tt> array.</div> | |
</li> | |
</ul> | |
<a name="getLogFile-long-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>getLogFile</h4> | |
<pre>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> getLogFile(long lognum)</pre> | |
<div class="block">Utility method for returning the <tt>File</tt> associated with the | |
given <tt>lognum</tt>.</div> | |
</li> | |
</ul> | |
<a name="getControlFile--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>getControlFile</h4> | |
<pre>private <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> getControlFile()</pre> | |
<div class="block">Utility method for returning the <tt>File</tt> that contains the | |
state information for this log.</div> | |
</li> | |
</ul> | |
<a name="getLogNum-long-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>getLogNum</h4> | |
<pre>private static long getLogNum(long count)</pre> | |
<div class="block">Utility method for returning the log file number for the given | |
(event) <tt>count</tt>.</div> | |
</li> | |
</ul> | |
<a name="stateCheck--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>stateCheck</h4> | |
<pre>private void stateCheck() | |
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> | |
<div class="block">Asserts that the log is in a valid state.</div> | |
<dl> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the log is in an invalid state</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="verifyInvariants--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>verifyInvariants</h4> | |
<pre>private boolean verifyInvariants()</pre> | |
<div class="block">Utility method for checking if the object invariants are valid.</div> | |
</li> | |
</ul> | |
<a name="assertInvariants--"> | |
<!-- --> | |
</a> | |
<ul class="blockListLast"> | |
<li class="blockList"> | |
<h4>assertInvariants</h4> | |
<pre>private void assertInvariants()</pre> | |
<div class="block">Utility method for asserting that the object invariants are valid.</div> | |
<dl> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="../../../../org/apache/river/mercury/InternalMailboxException.html" title="class in org.apache.river.mercury">InternalMailboxException</a></code> - if the invariants aren't valid</dd> | |
</dl> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<div class="bottomNav"><a name="navbar.bottom"> | |
<!-- --> | |
</a> | |
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> | |
<a name="navbar.bottom.firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../../overview-summary.html">Overview</a></li> | |
<li><a href="package-summary.html">Package</a></li> | |
<li class="navBarCell1Rev">Class</li> | |
<li><a href="class-use/PersistentEventLog.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../../index-all.html">Index</a></li> | |
<li><a href="../../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li><a href="../../../../org/apache/river/mercury/NonActivatableMercuryImpl.html" title="class in org.apache.river.mercury"><span class="typeNameLink">Prev Class</span></a></li> | |
<li><a href="../../../../org/apache/river/mercury/ProxyUtil.html" title="class in org.apache.river.mercury"><span class="typeNameLink">Next Class</span></a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../../index.html?org/apache/river/mercury/PersistentEventLog.html" target="_top">Frames</a></li> | |
<li><a href="PersistentEventLog.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_bottom"> | |
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_bottom"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<div> | |
<ul class="subNavList"> | |
<li>Summary: </li> | |
<li>Nested | </li> | |
<li><a href="#field.summary">Field</a> | </li> | |
<li><a href="#constructor.summary">Constr</a> | </li> | |
<li><a href="#method.summary">Method</a></li> | |
</ul> | |
<ul class="subNavList"> | |
<li>Detail: </li> | |
<li><a href="#field.detail">Field</a> | </li> | |
<li><a href="#constructor.detail">Constr</a> | </li> | |
<li><a href="#method.detail">Method</a></li> | |
</ul> | |
</div> | |
<a name="skip.navbar.bottom"> | |
<!-- --> | |
</a></div> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<p class="legalCopy"><small>Copyright 2007-2013, multiple authors.<br>Licensed under the <a href=http://www.apache.org/licenses/LICENSE-2.0 target=child >Apache License, Version 2.0</a>, see the <a href=../../../../doc-files/NOTICE target=child >NOTICE</a> file for attributions.</small></p> | |
</body> | |
</html> |