Documentation of 'org.opengis.feature.LockResponse' Java class
LockResponse
org.opengis.feature

Interface LockResponse



  • @XmlElement(value="LockFeatureResponse")
    public interface LockResponse
    Represents a response for a lock request. A lock is requested for a duration, except for the special case of a TRANSACTION_LOCK where the request is until the next commit or rollback.

    A successful lock request will result in an authorization ID being generated. This is a simple token you can keep until you need to work with the content again. Without this token you are prevented from work (at least until the duration is up).

    Since:
    GeoAPI 2.0
    • Method Detail

      • getNumberLocked

        int getNumberLocked()
        Number of features successfully locked, or -1 if unknown In the rare case where you need to report back on the number of successful locks you can issue a bunch of individual lock request and check the number of features locked.
        Returns:
        number of locked features or -1 if unknown.
      • increaseNumberLocked

        void increaseNumberLocked(int amount)
        Used to collect the results of a number of lock requests for Transaction.commit().
      • addAuthorization

        void addAuthorization(FeatureStore store,
                              java.lang.String token)
        Add an additional authorization token to collected results for Transaction.commit(). Note this abstraction does not allow the collection of more than one token per FeatureStore. This should not be an issue give our two workflows:
        • AUTO_COMMIT: Each lock method returns a different LockResponse.
        • Transaction + TRANSACTION_LOCK: Sepcial case object TRANSACTION_LOCK_RESPONSE is always returned.
        • Transaction: Each lock method returns null, commit returns a single LockResponse. Given that a Transaction is supposed to gather everything up into a single commit, a datastore should be capable of issuing a single authorization token (even if more then one of its FeatureCollections was involved in the transaction.
      • getToken

        @XmlElement(value="LockID")
        java.lang.String getToken()
        Retreives the authorization token for the special case of only one FeatureStore being locked. This is the most common situation. Often client code will only work on one FeatureCollection at a time, or several FeatureCollections belonging to the same FeatureStore.
        Returns:
        token, or null if a single token was unavailable.
      • getAuthorization

        java.lang.String getAuthorization(FeatureStore store)
        Returns the authorization token for indicated feature store, or null if there is no locks known for the feature store.
        Parameters:
        store - The feature store to search for.
        Returns:
        token, or null if a token for feature store was unavailable.
      • getFeatureStores

        @XmlElement(value="FeaturesLocked")
        java.util.Set<FeatureStore> getFeatureStores()
        Returns the set of locked feature stores.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.