congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IgniteInternalCache.context
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/ignite

  @Override public T applyx() throws IgniteCheckedException {
    return c.applyx(cache.context());
  }
});
origin: apache/ignite

/** {@inheritDoc} */
@Override public void restart(IgniteInternalCache cache) {
  invalidateLocalState();
  cacheView = cache;
  ctx = cache.context();
  rmvCheck = true;
  suspendFut.onDone();
}
origin: apache/ignite

/**
 * @return Cache context with given name from node.
 */
private GridCacheContext cacheContext(IgniteEx node, String cacheName) {
  return node.cachex(cacheName).context();
}
origin: apache/ignite

  @Override public Object call() throws Exception {
    qryProc.querySqlFields(cache.context(), qry, null, false, false);
    return null;
  }
}, IgniteSQLException.class, "Multiple statements queries are not supported for local queries");
origin: apache/ignite

/**
 * Verifies there is no ongoing user transaction.
 *
 * @throws CacheException
 */
private void checkTx() throws CacheException {
  if (delegate.context().tm().inUserTx())
    throw new CacheException("Explicit lock can't be acquired within a transaction.");
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void resetQueryDetailMetrics() {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  delegate.context().queries().resetDetailMetrics();
}
origin: apache/ignite

  @Override public Object call() throws Exception {
    qryProc.querySqlFields(cache.context(), qry, null, false, true);
    return null;
  }
}, IgniteSQLException.class, "Multiple statements queries are not supported");
origin: apache/ignite

/** {@inheritDoc} */
@Override public void resetQueryMetrics() {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  delegate.context().queries().resetMetrics();
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public Collection<? extends QueryDetailMetrics> queryDetailMetrics() {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  return delegate.context().queries().detailMetrics();
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public QueryMetrics queryMetrics() {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  return delegate.context().queries().metrics();
}
origin: apache/ignite

/**
 * @return Maximum number of bytes for IGFS data cache.
 */
public long maxSpaceSize() {
  DataRegion plc = dataCachePrj.context().dataRegion();
  long size = plc != null ? plc.config().getMaxSize() : 0;
  return (size <= 0) ? 0 : size ;
}
origin: apache/ignite

  @Override public void run() {
    try {
      Iterable<CacheEntryEvent<?, ?>> entries =
        serviceCache.context().continuousQueries().existingEntries(false, null);
      onSystemCacheUpdated(entries);
    }
    catch (IgniteCheckedException e) {
      U.error(log, "Failed to load service entries: " + e, e);
    }
  }
});
origin: apache/ignite

/** */
private static long updateCoutner(Ignite ign, Object key) {
  return dataStore(((IgniteEx)ign).cachex(DEFAULT_CACHE_NAME).context(), key)
    .map(IgniteCacheOffheapManager.CacheDataStore::updateCounter)
    .orElse(0L);
}
origin: apache/ignite

/** */
private static long updateCoutner(Ignite ign, Object key) {
  return dataStore(((IgniteEx)ign).cachex(DEFAULT_CACHE_NAME).context(), key)
    .map(IgniteCacheOffheapManager.CacheDataStore::updateCounter)
    .orElse(0L);
}
origin: apache/ignite

  /** {@inheritDoc} */
  @Override public void run() {
    IgniteInternalCache cache = ignite.context().cache().cache(name);
    try {
      cache.context().offheap().preloadPartition(part);
    }
    catch (IgniteCheckedException e) {
      log.error("Failed to preload the partition [cache=" + name + ", partition=" + part + ']', e);
      throw new IgniteException(e);
    }
  }
}
origin: apache/ignite

/**
 * @return {@code true} if near cache should be enabled.
 */
protected boolean nearEnabled() {
  return grid(testedNodeIdx).cachex(cacheName()).context().isNear();
}
origin: apache/ignite

  /**
   * @param node Node.
   * @param key Key.
   * @return Extracts update counter of partition which key belongs to.
   */
  private long getUpdateCounter(IgniteEx node, Integer key) {
    int partId = node.cachex(DEFAULT_CACHE_NAME).context().affinity().partition(key);

    GridDhtLocalPartition part = node.cachex(DEFAULT_CACHE_NAME).context().dht().topology().localPartition(partId);

    assert part != null;

    return part.updateCounter();
  }
}
origin: apache/ignite

/** @return Policy. */
protected T policy() {
  CacheEvictionManager evictMgr = grid().cachex(DEFAULT_CACHE_NAME).context().evicts();
  assert evictMgr instanceof GridCacheEvictionManager : evictMgr;
  return (T)((GridCacheEvictionManager)evictMgr).getEvictionPolicy();
}
origin: apache/ignite

/**
 * @param i Grid index.
 * @return Policy.
 */
protected T policy(int i) {
  CacheEvictionManager evictMgr = grid(i).cachex(DEFAULT_CACHE_NAME).context().evicts();
  assert evictMgr instanceof GridCacheEvictionManager : evictMgr;
  return (T)((GridCacheEvictionManager)evictMgr).getEvictionPolicy();
}
origin: apache/ignite

/**
 * @param i Grid index.
 * @return Policy.
 */
protected T nearPolicy(int i) {
  CacheEvictionManager evictMgr = grid(i).cachex(DEFAULT_CACHE_NAME).context().near().context().evicts();
  assert evictMgr instanceof GridCacheEvictionManager : evictMgr;
  return (T)((GridCacheEvictionManager)evictMgr).getEvictionPolicy();
}
/**
org.apache.ignite.internal.processors.cacheIgniteInternalCachecontext

Popular methods of IgniteInternalCache

  • 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.
  • clear
    Clears key on all nodes that store it's data. That is, caches are cleared on remote nodes and local
  • cache,
  • clear,
  • clearLocallyAll,
  • isEmpty,
  • isIgfsDataCache,
  • keySet,
  • localEntries,
  • localPeek,
  • lock

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top PhpStorm plugins
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