Codota Logo
IgniteInternalCache.unlock
Code IndexAdd Codota to your IDE (free)

How to use
unlock
method
in
org.apache.ignite.internal.processors.cache.IgniteInternalCache

Best Java code snippets using org.apache.ignite.internal.processors.cache.IgniteInternalCache.unlock (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void unlock(Object key) throws IgniteCheckedException {
  delegate.get().unlock(keyTransformer.transform(key));
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void unlock(K key) throws IgniteCheckedException {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    delegate.unlock(key);
  }
  finally {
    gate.leave(prev);
  }
}
origin: apache/ignite

  @Override public void run() {
    while (run) {
      TreeMap<Integer, String> vals = generateValues(keys);
      try {
        // Explicit lock.
        cache.lock(vals.firstKey(), 0);
        try {
          // Put or remove.
          if (ThreadLocalRandom.current().nextDouble(1) < 0.65)
            cache.putAll(vals);
          else
            cache.removeAll(vals.keySet());
        }
        catch (IgniteCheckedException e) {
          U.error(log(), "Failed cache operation.", e);
        }
        finally {
          cache.unlock(vals.firstKey());
        }
        U.sleep(100);
      }
      catch (Throwable e){
        U.error(log(), "Failed unlock.", e);
        err = e;
        return;
      }
    }
  }
};
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public void unlock(K key) throws IgniteCheckedException {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    delegate.unlock(key);
  }
  finally {
    gate.leave(prev);
  }
}
org.apache.ignite.internal.processors.cacheIgniteInternalCacheunlock

Javadoc

Unlocks given key only if current thread owns the lock. If optional filter will not pass, then unlock will not happen. If the key being unlocked was never locked by current thread, then this method will do nothing. Transactions Locks are not transactional and should not be used from within transactions. If you do need explicit locking within transaction, then you should use TransactionConcurrency#PESSIMISTIC concurrency control for transaction which will acquire explicit locks for relevant cache operations.

Popular methods of IgniteInternalCache

  • context
  • get
    Retrieves value mapped to the specified key from cache. Value will only be returned if its entry pas
  • affinity
    Gets affinity service to provide information about data partitioning and distribution.
  • configuration
    Gets configuration bean for this cache.
  • containsKey
  • getAndPut
    Stores given key-value pair in cache. If filters are provided, then entries will be stored in cache
  • getAndPutIfAbsent
    Stores given key-value pair in cache only if cache had no previous mapping for it. If cache previous
  • invoke
  • invokeAsync
  • put
    Stores given key-value pair in cache. If filters are provided, then entries will be stored in cache
  • size
  • cache
    Gets base cache for this projection.
  • size,
  • cache,
  • clear,
  • clearLocallyAll,
  • isEmpty,
  • isIgfsDataCache,
  • keySet,
  • localEntries,
  • localPeek,
  • lock

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • getApplicationContext (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now