Interface IgniteCacheProxy<K,​V>

    • Method Detail

      • cacheNoGate

        IgniteCacheProxy<K,​V> cacheNoGate()
        Gets cache proxy which does not acquire read lock on gateway enter, should be used only if grid read lock is externally acquired.
        Returns:
        Ignite cache proxy with simple gate.
      • keepBinary

        <K1,​V1> IgniteCache<K1,​V1> keepBinary()
        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:

        • 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 ( CacheConfiguration#isBinaryEnabled() returns true. If not, this method is no-op and will return current projection.

        Returns:
        Projection for binary objects.
      • withDataCenterId

        IgniteCache<K,​V> withDataCenterId​(byte dataCenterId)
        Parameters:
        dataCenterId - Data center ID.
        Returns:
        Projection for data center id.
      • skipStore

        IgniteCache<K,​V> skipStore()
        Returns:
        Cache with skip store enabled.
      • isProxyClosed

        boolean isProxyClosed()
        Returns:
        True if proxy was closed.
      • closeProxy

        void closeProxy()
        Closes this proxy instance.
      • destroyAsync

        IgniteFuture<?> destroyAsync()
        Returns:
        Future that contains cache destroy operation.
      • closeAsync

        IgniteFuture<?> closeAsync()
        Returns:
        Future that contains cache close operation.