|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.outrigger.OutriggerServerImpl.ContentsQuery
private class OutriggerServerImpl.ContentsQuery
Object that keeps the current state of contents queries. Holds the expiration time as well as the current state of the iteration.
Field Summary | |
---|---|
private Set |
classes
The Set of classes we need to search |
private Iterator |
classesIterator
An iteration into classes |
private EntryHolder.ContinuingQuery |
currentQuery
The current ContinuingQuery |
private long |
expiration
The current expiration time |
private EntryRep[] |
lastBatch
Last batch of entries returned |
private Uuid |
lastEntry
Uuid of the last entry returned |
private Object |
lock
Lock to prevent concurrent calls to nextBatch |
private WeakHashMap |
provisionallyRemovedEntrySet
Set of entries that we have encountered that have been provisionally removed |
private long |
remaining
Number of elements left to return before reaching the the client specified limit |
private EntryRep[] |
tmpls
The complete set of templates |
private Txn |
txn
The transaction the query is being performed under |
private Uuid |
uuid
Uuid associated with this query and its lease |
Constructor Summary | |
---|---|
private |
OutriggerServerImpl.ContentsQuery(Uuid uuid,
EntryRep[] tmpls,
Txn txn,
long limit)
|
Method Summary | |
---|---|
private boolean |
advanceCurrentQuery(long now)
|
private boolean |
cancel()
Remove this query, assumes caller holds lock on this object. |
Uuid |
getCookie()
Returns the universally unique identifier associated with this lease. |
long |
getExpiration()
Returns the expiration time of the lease. |
private EntryRep[] |
nextBatch(Uuid lastReceived,
long now)
|
void |
setExpiration(long newExpiration)
Changes the expiration time of the lease. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Uuid uuid
Uuid
associated with this query and its lease
private final Set classes
Set
of classes we need to search
private final Iterator classesIterator
classes
private final EntryRep[] tmpls
private final Txn txn
private final Object lock
nextBatch
private long expiration
private EntryHolder.ContinuingQuery currentQuery
ContinuingQuery
private long remaining
private Uuid lastEntry
private EntryRep[] lastBatch
private final WeakHashMap provisionallyRemovedEntrySet
Constructor Detail |
---|
private OutriggerServerImpl.ContentsQuery(Uuid uuid, EntryRep[] tmpls, Txn txn, long limit)
Method Detail |
---|
private boolean advanceCurrentQuery(long now)
private EntryRep[] nextBatch(Uuid lastReceived, long now) throws TransactionException
TransactionException
private boolean cancel()
true
if query has not
been already removed.
public void setExpiration(long newExpiration)
LeasedResource
setExpiration
in interface LeasedResource
newExpiration
- The new expiration time in milliseconds
since the beginning of the epochpublic long getExpiration()
LeasedResource
getExpiration
in interface LeasedResource
public Uuid getCookie()
LeasedResource
ReferentUuid
should return this object from their
getReferentUuid
method and should base their implementation of equals
on
this object.
getCookie
in interface LeasedResource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |