Return-Path: Delivered-To: apmail-incubator-river-commits-archive@minotaur.apache.org Received: (qmail 94544 invoked from network); 24 Dec 2010 21:59:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Dec 2010 21:59:29 -0000 Received: (qmail 9243 invoked by uid 500); 24 Dec 2010 21:59:28 -0000 Delivered-To: apmail-incubator-river-commits-archive@incubator.apache.org Received: (qmail 9216 invoked by uid 500); 24 Dec 2010 21:59:28 -0000 Mailing-List: contact river-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: river-dev@incubator.apache.org Delivered-To: mailing list river-commits@incubator.apache.org Received: (qmail 9209 invoked by uid 99); 24 Dec 2010 21:59:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 21:59:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 21:59:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 92B7B2388C06; Fri, 24 Dec 2010 21:58:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r781579 [3/6] - /websites/staging/river/trunk/content/river/doc/api/com/sun/jini/outrigger/ Date: Fri, 24 Dec 2010 21:58:33 -0000 To: river-commits@incubator.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101224215833.92B7B2388C06@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: websites/staging/river/trunk/content/river/doc/api/com/sun/jini/outrigger/OutriggerServerImpl.html ============================================================================== --- websites/staging/river/trunk/content/river/doc/api/com/sun/jini/outrigger/OutriggerServerImpl.html (added) +++ websites/staging/river/trunk/content/river/doc/api/com/sun/jini/outrigger/OutriggerServerImpl.html Fri Dec 24 21:58:32 2010 @@ -0,0 +1,2153 @@ + + + + + + +OutriggerServerImpl (Apache River v2.1.2-SNAPSHOT API Documentation) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.sun.jini.outrigger +
+Class OutriggerServerImpl

+
+java.lang.Object
+  extended by com.sun.jini.outrigger.OutriggerServerImpl
+
+
+
All Implemented Interfaces:
com.sun.jini.constants.TimeConstants, LocalLandlord, Recover, ServerProxyTrust
+
+
+
+
public class OutriggerServerImpl
extends Object
implements com.sun.jini.constants.TimeConstants, LocalLandlord, Recover, ServerProxyTrust
+ + +

+A basic implementation of a JavaSpacesTM + service. This class is designed for use by both transient and + persistent instances. Persistence is delegated to Store + and LogOps objects which handles the details + of implementing a particular persistence strategy. If transient + a null value is used for the LogOps object. +

+ OutriggerServerImpl maintains a list of types of + entries it has seen and their subtypes using a + TypeTree object. Each type of entry has an + EntryHolder that is stored in the + EntryHolderSet object named contents. +

+ On write, the written entry's class and superclass are + added to the known types, and its EntryRep + is added to the space's contents. +

+ On read, the find method searches through + the entries of its type and subtypes, asking each entry holder if it + has an entry that matches the template. If a match is found, the + matching EntryRep is returned. If none of the + appropriate holders has a match, it will return null. +

+ On take we also use find with a + boolean that says to remove the entry that matches. +

+ Notification requires a separate Notifier queue and + thread. When an entry is written, a reference to it is added to the + queue of "unexamined entries". The notifier thread pulls entries + off the queue and checks them against registered notification + templates. When it has found all matches for the template, the + Notifier thread adds the notifications for this write + to its list of undelivered notifications, which it periodically + attempts to deliver. +

+ On notify, the template is added to the + TemplateHolderSet named template. This + stores TemplateHolder objects for each known type. +

+ In this implementation, EntryRep ID's are approximate + time stamps. +

+ +

+

+
Author:
+
Sun Microsystems, Inc.
+
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static interfaceOutriggerServer.QueryCookie + +
+          Marker interface for objects that represent state + that the server finds useful to share across sub-queries.
+ + + + + + + +
Nested classes/interfaces inherited from interface com.sun.jini.landlord.Landlord
Landlord.RenewResults
+  + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static StringCOMPONENT_NAME + +
+          Component name we use to find items in the configuration and loggers.
+static StringPERSISTENCE_DIR_CONFIG_ENTRY + +
+          The name of the configuration entry we use to get the + the name of the log directory from.
+static StringstoreLoggerName + +
+          Logger name for information related to persistence
+ + + + + + + +
Fields inherited from interface net.jini.core.transaction.server.TransactionConstants
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING
+ + + + + + + +
Fields inherited from interface com.sun.jini.constants.TimeConstants
DAYS, HOURS, MINUTES, SECONDS
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidabort(TransactionManager mgr, + long id) + +
+          Requests that the participant roll back any changes for the specified + transaction and unlock any resources locked by the transaction.
+ voidaddLookupAttributes(Entry[] attrSets) + +
+          Add attribute sets for the service.
+ voidaddLookupGroups(String[] groups) + +
+          Add new groups to the set to join.
+ voidaddLookupLocators(LookupLocator[] locators) + +
+          Add locators for specific new lookup services to join.
+ voidcancel(Uuid cookie) + +
+          Called by the lease when its cancel method is + called.
+ MapcancelAll(Uuid[] cookies) + +
+          Called by the lease map when its cancelAll method is called.
+ voidclose(Uuid iterationUuid) + +
+          Forget about the indicated iteration
+ voidcommit(TransactionManager mgr, + long id) + +
+          Requests that the participant make all of its PREPARED + changes for the specified transaction visible outside of the + transaction and unlock any resources locked by the transaction.
+ com.sun.jini.outrigger.MatchSetDatacontents(com.sun.jini.outrigger.EntryRep[] tmpls, + Transaction tr, + long leaseTime, + long limit) + +
+          Start a new contents query.
+ Uuidcontents(com.sun.jini.outrigger.EntryRep tmpl, + Transaction tr) + +
+          Return the remote iterator object needed by + JavaSpaceAdmin.contents.
+ voiddelete(Uuid iterationUuid, + Uuid entryUuid) + +
+          Delete the given entry if the given iteration is still + valid and the entry was retured by the last call to + nextReps.
+ voiddestroy() + +
+          Destroy this space, exiting when finished.
+ ObjectgetAdmin() + +
+          Return a proxy that implements that JavaSpaceAdmin + interface.
+ Entry[]getLookupAttributes() + +
+          Get the current attribute sets for the service.
+ String[]getLookupGroups() + +
+          Get the list of groups to join.
+ LookupLocator[]getLookupLocators() + +
+          Get the list of locators of specific lookup services to join.
+ TrustVerifiergetProxyVerifier() + +
+          Returns a TrustVerifier that can be used to verify that + a proxy can be trusted as a proxy for the service; that is, the + isTrustedObject method of the + returned verifier can be called with a candidate proxy.
+ ObjectgetServiceProxy() + +
+          Returns a proxy object for this object.
+ voidmodifyLookupAttributes(Entry[] attrSetTemplates, + Entry[] attrSets) + +
+          Modify the current attribute sets, using the same semantics as + ServiceRegistration.modifyAttributes.
+ com.sun.jini.outrigger.EntryRep[]nextBatch(Uuid contentsQueryUuid, + Uuid entryUuid) + +
+          Return the next batch of entries associated with the specified + contents query.
+ com.sun.jini.outrigger.EntryRep[]nextReps(Uuid iterationUuid, + int max, + Uuid entryUuid) + +
+          Fetch up to max EntryRep objects from + the specified iteration.
+ EventRegistrationnotify(com.sun.jini.outrigger.EntryRep tmpl, + Transaction tr, + RemoteEventListener listener, + long leaseTime, + MarshalledObject handback) + +
+          When entries are written that match this template notify the + given listener.
+ intprepare(TransactionManager mgr, + long id) + +
+          Requests that the participant prepare itself to commit the transaction, + and to vote on the outcome of the transaction.
+ intprepareAndCommit(TransactionManager mgr, + long id) + +
+          A combination of prepare and commit, which + can be used by the manager when there is just one participant left to + prepare and all other participants (if any) have responded with + NOTCHANGED.
+ Objectread(com.sun.jini.outrigger.EntryRep tmpl, + Transaction txn, + long timeout, + OutriggerServer.QueryCookie cookie) + +
+          Find an entry in the space that matches the passed template and + is visible to the passed transaction.
+ ObjectreadIfExists(com.sun.jini.outrigger.EntryRep tmpl, + Transaction txn, + long timeout, + OutriggerServer.QueryCookie cookie) + +
+          Find an entry in the space that matches the passed template and + is visible to the passed transaction.
+ voidrecoverJoinState(StoredObject state) + +
+          Recover the join state from the previous session.
+ voidrecoverRegister(StoredResource registration, + String type, + StoredObject[] storedTemplates) + +
+          Recover an event registration.
+ voidrecoverSessionId(long sessionId) + +
+          Recover the id from the previous session and determine the new basis + value for the seq numbers issued by this session.
+ voidrecoverTake(Uuid cookie, + Long txnId) + +
+          Recover a take operation.
+ voidrecoverTransaction(Long txnId, + StoredObject transaction) + +
+          Recover a prepared transaction.
+ voidrecoverUuid(Uuid uuid) + +
+          Recover the Uuid for the service as a whole.
+ voidrecoverWrite(StoredResource entry, + Long txnId) + +
+          Recover a write operation.
+ EventRegistrationregisterForAvailabilityEvent(com.sun.jini.outrigger.EntryRep[] tmpls, + Transaction tr, + boolean visibilityOnly, + RemoteEventListener listener, + long leaseTime, + MarshalledObject handback) + +
+          When entries that match one or more of the passed templates + transition from invisible to visible notify the give + listener.
+ voidremoveLookupGroups(String[] groups) + +
+          Remove groups from the set to join.
+ voidremoveLookupLocators(LookupLocator[] locators) + +
+          Remove locators for specific lookup services from the set to join.
+ longrenew(Uuid cookie, + long extension) + +
+          Called by the lease when its renew method is called.
+ Landlord.RenewResultsrenewAll(Uuid[] cookies, + long[] extensions) + +
+          Called by the lease map when its renewAll method is called.
+ voidsetLookupGroups(String[] groups) + +
+          Replace the list of groups to join with a new list.
+ voidsetLookupLocators(LookupLocator[] locators) + +
+          Replace the list of locators of specific lookup services to join + with a new list.
+ JavaSpacespace() + +
+          Return the space administered by this object.
+ Objecttake(com.sun.jini.outrigger.EntryRep[] tmpls, + Transaction tr, + long timeout, + int limit, + OutriggerServer.QueryCookie queryCookieFromClient) + +
+          Find and remove up to limit entries in the space + that match one or more of the passed templates and are visible + to the passed transaction.
+ Objecttake(com.sun.jini.outrigger.EntryRep tmpl, + Transaction txn, + long timeout, + OutriggerServer.QueryCookie cookie) + +
+          Find and remove an entry in the space that matches the passed + template and is visible to the passed transaction.
+ ObjecttakeIfExists(com.sun.jini.outrigger.EntryRep tmpl, + Transaction txn, + long timeout, + OutriggerServer.QueryCookie cookie) + +
+          Find and remove an entry in the space that matches the passed + template and is visible to the passed transaction.
+ long[]write(com.sun.jini.outrigger.EntryRep[] entries, + Transaction tr, + long[] leaseTimes) + +
+          Write a set of entires into the space.
+ long[]write(com.sun.jini.outrigger.EntryRep rep, + Transaction tr, + long lease) + +
+          Write a new entry into the space.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+COMPONENT_NAME

+
+public static final String COMPONENT_NAME
+
+
Component name we use to find items in the configuration and loggers. +

+

+
See Also:
Constant Field Values
+
+
+ +

+storeLoggerName

+
+public static final String storeLoggerName
+
+
Logger name for information related to persistence +

+

+
See Also:
Constant Field Values
+
+
+ +

+PERSISTENCE_DIR_CONFIG_ENTRY

+
+public static final String PERSISTENCE_DIR_CONFIG_ENTRY
+
+
The name of the configuration entry we use to get the + the name of the log directory from. +

+

+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Method Detail
+ +

+write

+
+public long[] write(com.sun.jini.outrigger.EntryRep rep,
+                    Transaction tr,
+                    long lease)
+             throws TransactionException,
+                    RemoteException
+
+
Write a new entry into the space. +

+

+
+
+
+ +
Throws: +
TransactionException - A transaction error occurred +
RemoteException
+
+
+
+ +

+write

+
+public long[] write(com.sun.jini.outrigger.EntryRep[] entries,
+                    Transaction tr,
+                    long[] leaseTimes)
+             throws TransactionException,
+                    RemoteException
+
+
Write a set of entires into the space. +

+

+
+
+
+ +
Returns:
an array of longs that can be used to construct the + leases on the client side. The array will have 3 + elements for each lease, the first will be the + duration, followed by the high order bits of the + Uuid and then the lower order bits + of the Uuid. +
Throws: +
TransactionException - A transaction error occurred +
RemoteException
+
+
+
+ +

+notify

+
+public EventRegistration notify(com.sun.jini.outrigger.EntryRep tmpl,
+                                Transaction tr,
+                                RemoteEventListener listener,
+                                long leaseTime,
+                                MarshalledObject handback)
+                         throws TransactionException,
+                                RemoteException
+
+
When entries are written that match this template notify the + given listener. Matching is done as for read. +

+

+
+
+
+ +
Throws: +
TransactionException +
RemoteException
+
+
+
+ +

+registerForAvailabilityEvent

+
+public EventRegistration registerForAvailabilityEvent(com.sun.jini.outrigger.EntryRep[] tmpls,
+                                                      Transaction tr,
+                                                      boolean visibilityOnly,
+                                                      RemoteEventListener listener,
+                                                      long leaseTime,
+                                                      MarshalledObject handback)
+                                               throws TransactionException,
+                                                      RemoteException
+
+
When entries that match one or more of the passed templates + transition from invisible to visible notify the give + listener. Matching is done as for + read. +

+

+
+
+
+
Parameters:
tmpls - the templates that specify what entries should + generate events
tr - if non-null entries that become + visible to txn should generate events even + if txn is never committed. Registration is + terminated when txn leaves the active state
visibilityOnly - if true, events will + be generated for this registration only when a + matching Entry transitions from + invisible to visible, otherwise events will be + generated when a matching Entry + makes any transition from unavailable to + available
listener - object to notify when an entry becomes (re)visible
handback - object to be included with every notification +
Returns:
An object with information on the registration +
Throws: +
TransactionException - if txn is + non-null and not active or otherwise invalid +
RemoteException
+
+
+
+ +

+cancel

+
+public void cancel(Uuid cookie)
+            throws UnknownLeaseException
+
+
Description copied from interface: Landlord
+
Called by the lease when its cancel method is + called. Cancels the lease that is associated with the given + cookie. +

+

+
Specified by:
cancel in interface LocalLandlord
+
+
+
Parameters:
cookie - the Uuid associated with the lease who's + renew method was called +
Throws: +
UnknownLeaseException - if landlord does not know about + a lease with the specified cookie
+
+
+
+ +

+renew

+
+public long renew(Uuid cookie,
+                  long extension)
+           throws UnknownLeaseException,
+                  LeaseDeniedException
+
+
Description copied from interface: Landlord
+
Called by the lease when its renew method is called. + Renews the lease that is associated with the given cookie. +

+

+
Specified by:
renew in interface LocalLandlord
+
+
+
Parameters:
cookie - the Uuid associated with the lease who's + renew method was called
extension - argument passed to the renew call +
Returns:
The new duration the lease should have +
Throws: +
UnknownLeaseException - if landlord does not know about + a lease with the specified cookie +
LeaseDeniedException - if the landlord is unwilling to + renew the lease
+
+
+
+ +

+renewAll

+
+public Landlord.RenewResults renewAll(Uuid[] cookies,
+                                      long[] extensions)
+
+
Description copied from interface: Landlord
+
Called by the lease map when its renewAll method is called. Should renew the lease that is + associated with each element of cookies +

+

+
+
+
+
Parameters:
cookies - an array of Uuids, each universally and + uniquely identifying a lease granted by this + Landlord
extensions - an array of longs, each representing an a + duration in milliseconds that the client + wants the lease associated with the Uuid + from the corresponding element of + cookies renewed for +
Returns:
A RenewResults object that contains the new + duration of each lease that was successfully renewed or + the exception encountered for each lease that could not + be renewed
+
+
+
+ +

+cancelAll

+
+public Map cancelAll(Uuid[] cookies)
+
+
Description copied from interface: Landlord
+
Called by the lease map when its cancelAll method is called. Should cancel the lease that is + associated with each element of cookies +

+

+
+
+
+
Parameters:
cookies - an array of Uuids, each universally and + uniquely identifying a lease granted by this + Landlord +
Returns:
If all the leases specified in the cookies + could be cancelled return null. Otherwise, + return a Map that for each failed cancel + attempt maps the corresponding cookie object to an + exception describing the failure.
+
+
+
+ +

+read

+
+public Object read(com.sun.jini.outrigger.EntryRep tmpl,
+                   Transaction txn,
+                   long timeout,
+                   OutriggerServer.QueryCookie cookie)
+            throws TransactionException,
+                   RemoteException,
+                   InterruptedException
+
+
Find an entry in the space that matches the passed template and + is visible to the passed transaction. Depending on the state of + the space and the arguments this call may block if no entry can + be immediately returned. The proxy can specify the maximum + period it is willing to wait for a response using the + timeout parameter. The proxy may choose to + breakup a query from the client with a very long timeout into a + set of sub-queries. In such cases it may get a + QueryCookie as response to the sub-queries, in + these cases it should pass the QueryCookie to the + next sub-query (if any) associated with the same request from + the client. +

+ If a match is found it is returned as an EntryRep. + If txn is non-null the + entry is read locked by the transaction, this allows + other queries to read, but not take the entry. The lock + will be released when the transaction is aborted or prepared. +

+ If no match is found the call will block for up to the + specified timeout for a match to appear. If there + is still no match available the call will return a + QueryCookie. +

+

+
+
+
+
Parameters:
tmpl - The template that describes the entry being + searched for. May be null if + any visible entry is acceptable.
timeout - The maximum number of milliseconds this + call should block in the server before + returning an answer (this not necessarily + the timeout the client asked for.) A value + of 0 indicates the initial search should + be performed, but if no match can be found + null or a QueryCookie + (as appropriate) should be returned immediately.
cookie - If this call is a continuation of + an earlier query, the cookie from the + last sub-query. +
Throws: +
TransactionException - if there is a problem + with the specified transaction such as + it can not be joined, or leaves the active + state before the call is complete. +
RemoteException - if a network failure occurs. +
InterruptedException - if the thread in the server + is interrupted before the query can be completed.
+
+
+
+ +

+take

+
+public Object take(com.sun.jini.outrigger.EntryRep tmpl,
+                   Transaction txn,
+                   long timeout,
+                   OutriggerServer.QueryCookie cookie)
+            throws TransactionException,
+                   RemoteException,
+                   InterruptedException
+
+
Find and remove an entry in the space that matches the passed + template and is visible to the passed transaction. Depending on + the state of the space and the arguments this call may block if + no entry can be immediately returned. The proxy can specify the + maximum period it is willing to wait for a response using the + timeout parameter. The proxy may choose to + breakup a query from the client with a very long timeout into a + set of sub-queries. In such cases it may get a + QueryCookie as response to the sub-queries, in + these cases it should pass the QueryCookie to the + next sub-query (if any) associated with the same request from + the client. +

+ If a match is found it is returned as an EntryRep. + If txn is null the entry is removed + from the space. If txn is non-null the + entry is exclusively locked by the transaction and will be removed + from the space if the transaction is committed. +

+ If no match is found the call will block for up to the + specified timeout for a match to appear. If there + is still no match available the call will return a + QueryCookie. +

+

+
+
+
+
Parameters:
tmpl - The template that describes the entry being + searched for. May be null if + any visible entry is acceptable.
timeout - The maximum number of milliseconds this + call should block in the server before + returning an answer (this not necessarily + the timeout the client asked for.) A value + of 0 indicates the initial search should + be performed, but if no match can be found + null or a QueryCookie + (as appropriate) should be returned immediately.
cookie - If this call is a continuation of + an earlier query, the cookie from the + last sub-query. +
Throws: +
TransactionException - if there is a problem + with the specified transaction such as + it can not be joined, or leaves the active + state before the call is complete. +
RemoteException - if a network failure occurs. +
InterruptedException - if the thread in the server + is interrupted before the query can be completed.
+
+
+
+ +

+readIfExists

+
+public Object readIfExists(com.sun.jini.outrigger.EntryRep tmpl,
+                           Transaction txn,
+                           long timeout,
+                           OutriggerServer.QueryCookie cookie)
+                    throws TransactionException,
+                           RemoteException,
+                           InterruptedException
+
+
Find an entry in the space that matches the passed template and + is visible to the passed transaction. Depending on the state of + the space and the arguments this call may block if no entry can + be immediately returned. The proxy can specify the maximum + period it is willing to wait for a response using the + timeout parameter. The proxy may choose to + breakup a query from the client with a very long timeout into a + set of sub-queries. In such cases it may get a + QueryCookie as response to the sub-queries, in + these cases it should pass the QueryCookie to the + next sub-query (if any) associated with the same request from + the client. +

+ If a match is found it is returned as an EntryRep. + If txn is non-null the + entry is read locked by the transaction, this allows + other queries to read, but not take the entry. The lock + will be released when the transaction is aborted or prepared. +

+ If no match can be initially found the call will block until + either the timeout expires or for a detectable period of time + there are no entries in the space (visible to the transaction + or not) that match the passed template. If at some point + there are no matching entries in the space null + will be returned. If the timeout expires and there are matching + entries in the space but none are visible to the passed + transaction a QueryCookie will be returned. +

+

+
+
+
+
Parameters:
tmpl - The template that describes the entry being + searched for. May be null if + any visible entry is acceptable.
timeout - The maximum number of milliseconds this + call should block in the server before + returning an answer (this not necessarily + the timeout the client asked for.) A value + of 0 indicates the initial search should + be performed, but if no match can be found + null or a QueryCookie + (as appropriate) should be returned immediately.
cookie - If this call is a continuation of + an earlier query, the cookie from the + last sub-query. +
Throws: +
TransactionException - if there is a problem + with the specified transaction such as + it can not be joined, or leaves the active + state before the call is complete. +
RemoteException - if a network failure occurs. +
InterruptedException - if the thread in the server + is interrupted before the query can be completed.
+
+
+
+ +

+takeIfExists

+
+public Object takeIfExists(com.sun.jini.outrigger.EntryRep tmpl,
+                           Transaction txn,
+                           long timeout,
+                           OutriggerServer.QueryCookie cookie)
+                    throws TransactionException,
+                           RemoteException,
+                           InterruptedException
+
+
Find and remove an entry in the space that matches the passed + template and is visible to the passed transaction. Depending on + the state of the space and the arguments this call may block if + no entry can be immediately returned. The proxy can specify the + maximum period it is willing to wait for a response using the + timeout parameter. The proxy may choose to + breakup a query from the client with a very long timeout into a + set of sub-queries. In such cases it may get a + QueryCookie as response to the sub-queries, in + these cases it should pass the QueryCookie to the + next sub-query (if any) associated with the same request from + the client. +

+ If a match is found it is returned as an EntryRep. + If txn is null the entry is removed + from the space. If txn is non-null the + entry is exclusively locked by the transaction and will be removed + from the space if the transaction is committed. +

+ If no match can be initially found the call will block until + either the timeout expires or for a detectable period of time + there are no entries in the space (visible to the transaction + or not) that match the passed template. If at some point there + are no matching entries in the space null will be + returned. If the timeout expires and there are matching entries + in the space but none are visible to the passed transaction a + QueryCookie will be returned. +

+

+
+
+
+
Parameters:
tmpl - The template that describes the entry being + searched for. May be null if + any visible entry is acceptable.
timeout - The maximum number of milliseconds this + call should block in the server before + returning an answer (this not necessarily + the timeout the client asked for.) A value + of 0 indicates the initial search should + be performed, but if no match can be found + null or a QueryCookie + (as appropriate) should be returned immediately.
cookie - If this call is a continuation of + an earlier query, the cookie from the + last sub-query. +
Throws: +
TransactionException - if there is a problem + with the specified transaction such as + it can not be joined, or leaves the active + state before the call is complete. +
RemoteException - if a network failure occurs. +
InterruptedException - if the thread in the server + is interrupted before the query can be completed.
+
+
+
+ +

+take

+
+public Object take(com.sun.jini.outrigger.EntryRep[] tmpls,
+                   Transaction tr,
+                   long timeout,
+                   int limit,
+                   OutriggerServer.QueryCookie queryCookieFromClient)
+            throws TransactionException,
+                   RemoteException
+
+
Find and remove up to limit entries in the space + that match one or more of the passed templates and are visible + to the passed transaction. Depending on the state of the space + and the arguments this call may block if no entry can be + immediately returned. The proxy can specify the maximum period + it is willing to wait for a response using the + timeout parameter. The proxy may choose to + breakup a query from the client with a very long timeout into a + set of sub-queries. In such cases it may get a + QueryCookie as response to the sub-queries, in + these cases it should pass the QueryCookie to the + next sub-query (if any) associated with the same request from + the client. +

+ If matchs are found they are returned as in an array of + EntryRep. If txn is + null the entries are removed from the space. If + txn is non-null the entries are + exclusively locked by the transaction and will be removed from + the space if the transaction is committed. +

+ If there are no matches the call will block for up to the + specified timeout for a match to appear. If there is still no + match available the call will return a + QueryCookie. +

+

+
+
+
+
Parameters:
tmpls - The templates that describes the entries being + searched for
tr - The transaction the operation should be + performed under. Maybe be null. + If non-null and entries are found they + will removed under this transaction.
timeout - The maximum number of milliseconds this + call should block in the server before + returning an answer (this not necessarily + the timeout the client asked for.) A value + of 0 indicates the initial search should + be performed, but if no match can be found + a QueryCookie should be + returned immediately.
limit - The maximum number of entries that should be taken
queryCookieFromClient - If this call is a continuation of + an earlier query, the cookie from the + last sub-query. +
Throws: +
TransactionException - if there is a problem + with the specified transaction such as + it can not be joined, or leaves the active + state before the call is complete. +
RemoteException - if a network failure occurs.
+
+
+
+ +

+contents

+
+public com.sun.jini.outrigger.MatchSetData contents(com.sun.jini.outrigger.EntryRep[] tmpls,
+                                                    Transaction tr,
+                                                    long leaseTime,
+                                                    long limit)
+                                             throws TransactionException,
+                                                    RemoteException
+
+
Start a new contents query. Returns a + MatchSetData with the initial batch of + entries and (if applicable) the Uuid and initial + lease duration. If the entire result set is contained in the + returned MatchSetData the Uuid + will be null and the lease duration will be + -1. +

+

+
+
+
+
Parameters:
tmpls - the templates to use for the iteration
tr - the transaction to perform the iteration under, + may be null
leaseTime - the requested lease time
limit - the maximum number of entries to return +
Returns:
A MatchSetData with the initial batch + of entries and (if applicable) the Uuid and initial + lease duration. Initial batch will be the empty array if + there are no matching entries in the space +
Throws: +
TransactionException - if + tr is non-null and can't be used +
RemoteException
+
+
+
+ +

+nextBatch

+
+public com.sun.jini.outrigger.EntryRep[] nextBatch(Uuid contentsQueryUuid,
+                                                   Uuid entryUuid)

[... 805 lines stripped ...]