Tabnine Logo
IgniteInternalCache.isLockedByThread
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/ignite

/** {@inheritDoc} */
@Override public boolean isLockedByThread(Object key) {
  return delegate.get().isLockedByThread(keyTransformer.transform(key));
}
origin: apache/ignite

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

/** {@inheritDoc} */
@Override public boolean isLocalLocked(K key, boolean byCurrThread) {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  return byCurrThread ? delegate.isLockedByThread(key) : delegate.isLocked(key);
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public boolean isLockedByThread(K key) {
  A.notNull(key, "key");
  if (keyCheck)
    validateCacheKey(key);
  try {
    KeyCacheObject cacheKey = ctx.toCacheKeyObject(key);
    GridCacheEntryEx e = entry0(cacheKey,
      ctx.shared().exchange().readyAffinityVersion(),
      false,
      false);
    if (e == null)
      return false;
    // Delegate to near if dht.
    if (e.isDht() && CU.isNearEnabled(ctx)) {
      IgniteInternalCache<K, V> near = ctx.isDht() ? ctx.dht().near() : ctx.near();
      return near.isLockedByThread(key) || e.lockedByThread();
    }
    return e.lockedByThread();
  }
  catch (GridCacheEntryRemovedException ignore) {
    return false;
  }
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public boolean isLocalLocked(K key, boolean byCurrThread) {
  return byCurrThread ? delegate.isLockedByThread(key) : delegate.isLocked(key);
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public boolean isLockedByThread(K key) {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    return delegate.isLockedByThread(key);
  }
  finally {
    gate.leave(prev);
  }
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public boolean isLockedByThread(K key) {
  A.notNull(key, "key");
  if (keyCheck)
    validateCacheKey(key);
  try {
    KeyCacheObject cacheKey = ctx.toCacheKeyObject(key);
    GridCacheEntryEx e = entry0(cacheKey,
      ctx.shared().exchange().readyAffinityVersion(),
      false,
      false);
    if (e == null)
      return false;
    // Delegate to near if dht.
    if (e.isDht() && CU.isNearEnabled(ctx)) {
      IgniteInternalCache<K, V> near = ctx.isDht() ? ctx.dht().near() : ctx.near();
      return near.isLockedByThread(key) || e.lockedByThread();
    }
    return e.lockedByThread();
  }
  catch (GridCacheEntryRemovedException ignore) {
    return false;
  }
}
org.apache.ignite.internal.processors.cacheIgniteInternalCacheisLockedByThread

Javadoc

Checks if current thread owns a lock on this key.

This is a local in-VM operation and does not involve any network trips or access to persistent storage in any way.

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

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best plugins for Eclipse
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