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

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

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

origin: apache/ignite

/** {@inheritDoc} */
@Override public IgniteInternalCache keepBinary() {
  return delegate.get().keepBinary();
}
origin: apache/ignite

/** {@inheritDoc} */
@Nullable @Override public Object localExecute(@Nullable IgniteInternalCache cache) {
  assert cache != null : "Failed to get a cache [cacheName=" + cacheName + ", topVer=" + topVer + "]";
  if (keepBinary)
    cache = cache.keepBinary();
  return super.localExecute(cache);
}
origin: apache/ignite

  /** {@inheritDoc} */
  @Override public GridRestResponse call() throws Exception {
    IgniteInternalCache<?, ?> prj = cache(g, cacheName)
      .forSubjectId(clientId)
      .setSkipStore(cacheFlags.contains(SKIP_STORE));
    if (cacheFlags.contains(KEEP_BINARIES))
      prj = prj.keepBinary();
    // Need to apply both operation and response transformation remotely
    // as cache could be inaccessible on local node and
    // exception processing should be consistent with local execution.
    return op.apply((IgniteInternalCache<Object, Object>)prj, ((IgniteKernal)g).context()).
      chain(resultWrapper((IgniteInternalCache<Object, Object>)prj, key)).get();
  }
}
origin: apache/ignite

prj = prj.keepBinary();
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Nullable @Override public Object localExecute(@Nullable IgniteInternalCache cache) {
  assert cache != null : "Failed to get a cache [cacheName=" + cacheName + ", topVer=" + topVer + "]";
  if (keepBinary)
    cache = cache.keepBinary();
  return super.localExecute(cache);
}
origin: org.apache.ignite/ignite-core

  /** {@inheritDoc} */
  @Override public GridRestResponse call() throws Exception {
    IgniteInternalCache<?, ?> prj = cache(g, cacheName)
      .forSubjectId(clientId)
      .setSkipStore(cacheFlags.contains(SKIP_STORE));
    if (cacheFlags.contains(KEEP_BINARIES))
      prj = prj.keepBinary();
    // Need to apply both operation and response transformation remotely
    // as cache could be inaccessible on local node and
    // exception processing should be consistent with local execution.
    return op.apply((IgniteInternalCache<Object, Object>)prj, ((IgniteKernal)g).context()).
      chain(resultWrapper((IgniteInternalCache<Object, Object>)prj, key)).get();
  }
}
origin: org.apache.ignite/ignite-core

prj = prj.keepBinary();
org.apache.ignite.internal.processors.cacheIgniteInternalCachekeepBinary

Javadoc

Creates projection that will operate with binary objects.

Projection returned by this method will force cache not to deserialize binary objects, so keys and values will be returned from cache API methods without changes. Therefore, signature of the projection can contain only following types:

  • org.gridgain.grid.binary.BinaryObject for binary classes
  • All primitives (byte, int, ...) and there boxed versions (Byte, Integer, ...)
  • Arrays of primitives (byte[], int[], ...)
  • String and array of Strings
  • UUID and array of UUIDs
  • Date and array of Dates
  • Timestamp and array of Timestamps
  • Enums and array of enums
  • Maps, collections and array of objects (but objects inside them will still be converted if they are binary)

For example, if you use Integer as a key and Value class as a value (which will be stored in binary format), you should acquire following projection to avoid deserialization:

 
IgniteInternalCache prj = cache.keepBinary(); 
// Value is not deserialized and returned in binary format. 
GridBinaryObject po = prj.get(1); 

Note that this method makes sense only if cache is working in binary mode (org.apache.ignite.configuration.CacheConfiguration#isBinaryEnabled() returns true. If not, this method is no-op and will return current projection.

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

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Option (scala)
  • Top Sublime Text 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