Tabnine Logo
LockingManager.lockFeatureID
Code IndexAdd Tabnine to your IDE (free)

How to use
lockFeatureID
method
in
org.geotools.data.LockingManager

Best Java code snippets using org.geotools.data.LockingManager.lockFeatureID (Showing top 14 results out of 315)

origin: geotools/geotools

  public void lockFeatureID(
      String typeName, String authID, Transaction transaction, FeatureLock featureLock)
      throws IOException {
    DataStore store = cache.getDataStore(typeName, false);

    if ((store != null) && (store.getLockingManager() != null)) {
      store.getLockingManager().lockFeatureID(typeName, authID, transaction, featureLock);
    }
  }
}
origin: geotools/geotools

private void createLock() throws IOException {
  dataStore
      .getLockingManager()
      .lockFeatureID(
          SAMPLE_FEATURE_NAME,
          SAMPLE_FEATURE_ID,
          tx,
          new FeatureLock(SAMPLE_FEATURE_ID, 10000000L));
}
origin: geotools/geotools

private void createManyLocks() throws IOException {
  for (int count = 0; count < JDBCDataStore.MAX_IDS_IN_FILTER + 1; count++) {
    dataStore
        .getLockingManager()
        .lockFeatureID(
            SAMPLE_FEATURE_NAME,
            count + "",
            tx,
            new FeatureLock(count + "", 10000000L));
  }
}
origin: geotools/geotools

getDataStore()
    .getLockingManager()
    .lockFeatureID(typeName, feature.getID(), transaction, lock);
origin: org.geotools/gt-directory

/**
 * @see org.geotools.data.LockingManager#lockFeatureID(java.lang.String,
 *      java.lang.String, org.geotools.data.Transaction,
 *      org.geotools.data.FeatureLock)
 */
public void lockFeatureID(String typeName, String authID,
  Transaction transaction, FeatureLock featureLock)
  throws IOException {
  AbstractFileDataStore afds = (AbstractFileDataStore) dataStores.get(typeName);
  if ((afds != null) && (afds.getLockingManager() != null)) {
    afds.getLockingManager().lockFeatureID(typeName, authID,
      transaction, featureLock);
  }
}

origin: locationtech/geowave

@Override
protected void doLockInternal(final String typeName, final SimpleFeature feature)
  throws IOException {
 getDataStore().getLockingManager().lockFeatureID(typeName, feature.getID(), transaction, lock);
}
origin: org.geotools/gt-directory

public void lockFeatureID(String typeName, String authID,
  Transaction transaction, FeatureLock featureLock)
  throws IOException {
  DataStore store = cache.getDataStore(typeName, false);
  if ((store != null) && (store.getLockingManager() != null)) {
    store.getLockingManager().lockFeatureID(typeName, authID,
      transaction, featureLock);
  }
}
origin: org.geotools/gt-data

public void lockFeatureID(String typeName, String authID,
  Transaction transaction, FeatureLock featureLock)
  throws IOException {
  DataStore store = cache.getDataStore(typeName, false);
  if ((store != null) && (store.getLockingManager() != null)) {
    store.getLockingManager().lockFeatureID(typeName, authID,
      transaction, featureLock);
  }
}
origin: org.geotools/gt-postgis

/**
 * HACK HACK HACK!!!  Don't use unless you're working on geoserver. just
 * using ints for return now, to easily swap out with what we've got going
 * on right now.
 *
 * @param feature DOCUMENT ME!
 *
 * @return DOCUMENT ME!
 *
 * @throws IOException DOCUMENT ME!
 * @throws UnsupportedOperationException DOCUMENT ME!
 */
public int lockFeature(SimpleFeature feature) throws IOException {
  LockingManager lockingManager = getDataStore().getLockingManager();
  if (lockingManager == null) {
    throw new UnsupportedOperationException(
      "DataStore not using lockingManager, must provide alternate implementation");
  }
  try {
    //TODO: more checking here, check feature.typename == this.typename
    //perhaps even feature.getFeatureType == this.featureType.
    lockingManager.lockFeatureID(tableName, feature.getID(),
      getTransaction(), featureLock);
    return 1;
  } catch (FeatureLockException locked) {
    return 0;
  }
}
origin: org.geotools/gt-data

} else {
  getDataStore().getLockingManager()
    .lockFeatureID(typeName, feature.getID(), transaction, lock);
origin: org.geotools/gt-postgis

try {
  feature = (SimpleFeature) reader.next();
  lockingManager.lockFeatureID(typeName, feature.getID(),
    transaction, featureLock);
  count++;
origin: org.geotools/gt-main

try {
  feature = reader.next();
  lockingManager.lockFeatureID(typeName, feature.getID(),
    getTransaction(), featureLock);
  count++;
origin: org.geotools/gt2-jdbc

try {
  feature = reader.next();
  lockingManager.lockFeatureID(typeName, feature.getID(),
    getTransaction(), featureLock);
  count++;
origin: org.geotools/gt2-main

try {
  feature = reader.next();
  lockingManager.lockFeatureID(typeName, feature.getID(),
    getTransaction(), featureLock);
  count++;
org.geotools.dataLockingManagerlockFeatureID

Javadoc

FeatureID based locking.

Popular methods of LockingManager

  • unLockFeatureID
    FeatureID based unlocking.
  • exists
    Check if any locks exist held by the authorization lockID. (remember that the lock may have expired)
  • release
    Release locks held by the authorization lockID. (remember that the lock may have expired)
  • refresh
    Refresh locks held by the authorization lockID. All features locked with the provied lockID will be

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now