Codota Logo
org.apache.ignite.internal.processors.cache
Code IndexAdd Codota to your IDE (free)

How to use org.apache.ignite.internal.processors.cache

Best Java code snippets using org.apache.ignite.internal.processors.cache (Showing top 20 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

/**
 *
 */
private void onLeft() {
  for (CacheGroupContext grp : cctx.cache().cacheGroups()) {
    if (grp.isLocal())
      continue;
    grp.preloader().unwindUndeploys();
    cctx.exchange().exchangerUpdateHeartbeat();
  }
}
origin: apache/ignite

/**
 * Get affinity assignment for the given topology version.
 *
 * @param topVer Topology version.
 * @return Affinity assignment.
 */
public AffinityAssignment assignment(AffinityTopologyVersion topVer) {
  return assignment(topVer, cctx.shared().exchange().lastAffinityChangedTopologyVersion(topVer));
}
origin: apache/ignite

/**
 * @param e Transaction entry.
 * @param topVer Topology version.
 * @return {@code True} if entry is locally mapped as a primary or back up node.
 */
protected boolean isNearLocallyMapped(GridCacheEntryEx e, AffinityTopologyVersion topVer) {
  return ctx.affinity().partitionBelongs(ctx.localNode(), e.partition(), topVer);
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
  super.finishUnmarshal(ctx, ldr);
  assert key != null;
  GridCacheContext cctx = ctx.cacheContext(cacheId);
  key.finishUnmarshal(cctx.cacheObjectContext(), ldr);
}
origin: apache/ignite

/**
 * @param entry Entry.
 * @return {@code True} if local node is current primary for given entry.
 */
private boolean primaryLocal(GridCacheEntryEx entry) {
  return entry.context().affinity().primaryByPartition(cctx.localNode(), entry.partition(), AffinityTopologyVersion.NONE);
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void run() {
  for (GridCacheEntryEx gridCacheEntryEx : cache.entries())
    clearEntry(gridCacheEntryEx);
  if (!ctx.isNear()) {
    if (id == 0)
      ctx.offheap().clearCache(ctx, readers);
  }
}
origin: apache/ignite

/**
 * @param key Entry key.
 * @return Entry (never {@code null}).
 */
public final GridCacheEntryEx entryEx(KeyCacheObject key) {
  return entryEx(key, ctx.affinity().affinityTopologyVersion());
}
origin: apache/ignite

/**
 * @param opCtx Cache operation context.
 */
private void onEnter(CacheOperationContext opCtx) {
  ctx.itHolder().checkWeakQueue();
  if (ctx.deploymentEnabled())
    ctx.deploy().onEnter();
  if (opCtx != null)
    checkAtomicOpsInTx(opCtx);
}
origin: apache/ignite

/**
 * @param cctx Cache context.
 * @throws IgniteCheckedException In case of error.
 */
void prepareMarshal(GridCacheContext cctx) throws IgniteCheckedException {
  if (key != null)
    key.prepareMarshal(cctx.cacheObjectContext());
  if (newVal != null)
    newVal.prepareMarshal(cctx.cacheObjectContext());
  if (oldVal != null)
    oldVal.prepareMarshal(cctx.cacheObjectContext());
}
origin: apache/ignite

/** {@inheritDoc} */
@Override protected void onKernalStop0(boolean cancel) {
  if (pendingEntries != null)
    pendingEntries.clear();
  cctx.shared().ttl().unregister(this);
}
origin: apache/ignite

  /** {@inheritDoc} */
  @Override public GridDhtPartitionTopology topology(DiscoCache discoCache) {
    return cctx.exchange().clientTopology(groupId(), discoCache);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public GridCacheProxyImpl<K, V> withExpiryPolicy(ExpiryPolicy plc) {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    return new GridCacheProxyImpl<>(ctx, delegate,
      opCtx != null ? opCtx.withExpiryPolicy(plc) :
        new CacheOperationContext(false, null, false, plc, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX));
  }
  finally {
    gate.leave(prev);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public Iterator<Cache.Entry<K, V>> iterator() {
  GridCacheContext<K, V> ctx = getContextSafe();
  try {
    return ctx.cache().igniteIterator();
  }
  catch (IgniteCheckedException | IgniteException e) {
    throw cacheException(e);
  }
}
origin: apache/ignite

/**
 * @return The size of pending entries.
 * @throws IgniteCheckedException If failed.
 */
public long pendingSize() throws IgniteCheckedException {
  return (pendingEntries != null ? pendingEntries.sizex() : 0) + cctx.offheap().expiredSize();
}
origin: apache/ignite

/**
 *
 * @param key Entry key.
 */
public final void removeIfObsolete(KeyCacheObject key) {
  assert key != null;
  GridCacheMapEntry entry = map.getEntry(ctx, key);
  if (entry != null && entry.obsolete())
    removeEntry(entry);
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public CacheMetricsMXBean mxBean() {
  GridCacheContext<K, V> ctx = getContextSafe();
  return ctx.cache().clusterMxBean();
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public CacheMetricsMXBean localMxBean() {
  GridCacheContext<K, V> ctx = getContextSafe();
  return ctx.cache().localMxBean();
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public CacheMetrics metrics() {
  GridCacheContext<K, V> ctx = getContextSafe();
  return ctx.cache().clusterMetrics();
}
origin: apache/ignite

/**
 * @return Internal proxy.
 */
@Override public GridCacheProxyImpl<K, V> internalProxy() {
  GridCacheContext<K, V> ctx = getContextSafe();
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  return new GridCacheProxyImpl<>(ctx, delegate, ctx.operationContextPerCall());
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public IgniteInternalCache<K, V> withAllowAtomicOpsInTx() {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    return new GridCacheProxyImpl<>(ctx, delegate, opCtx.setAllowAtomicOpsInTx());
  }
  finally {
    gate.leave(prev);
  }
}
org.apache.ignite.internal.processors.cache

Most used classes

  • GridCacheProcessor
    Cache processor.
  • GridCacheContext
    Cache context.
  • GridCacheSharedContext
    Shared context.
  • CacheEntryImpl
  • DynamicCacheDescriptor
    Cache start descriptor.
  • PageIO,
  • IgniteTxManager,
  • CacheGroupContext,
  • GridCacheAdapter,
  • IgniteCacheProxy,
  • IgniteInternalCache,
  • GridDhtPartitionTopology,
  • GridCacheDatabaseSharedManager,
  • GridCacheQueryManager,
  • CacheGroupDescriptor,
  • CacheObject,
  • GridCacheAffinityManager,
  • GridCachePartitionExchangeManager,
  • IgniteCacheOffheapManager$CacheDataStore
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