Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 124FB10555 for ; Fri, 20 Feb 2015 08:24:12 +0000 (UTC) Received: (qmail 20679 invoked by uid 500); 20 Feb 2015 08:23:37 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 20641 invoked by uid 500); 20 Feb 2015 08:23:37 -0000 Mailing-List: contact dev-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list dev@ignite.incubator.apache.org Received: (qmail 20627 invoked by uid 99); 20 Feb 2015 08:23:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2015 08:23:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 20 Feb 2015 08:23:14 +0000 Received: (qmail 20457 invoked by uid 99); 20 Feb 2015 08:23:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2015 08:23:11 +0000 Date: Fri, 20 Feb 2015 08:23:11 +0000 (UTC) From: "Alexey Goncharuk (JIRA)" To: dev@ignite.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-51) Support store-by-value mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IGNITE-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Goncharuk updated IGNITE-51: ----------------------------------- Description: # Need to introduce interface {{CacheObject}} and {{KeyCacheObject}} that will hide the implementation details of cached object representation. {code} public interface CacheObject { public T value(GridCacheContext ctx); public T getField(String name); public byte[] valueBytes(); } public interface KeyCacheObject extends CacheObject { public int hashCode(); } {code} Implementation of this class must always store serialized form of the object and should be optionally store deserialized form of the object. Cache object must never keep the original reference of the user object. # Inside {{GridCacheMapEntry}} fields {{key}}, {{keyBytes}}, {{value}} and {{valueBytes}} should be replaced with corresponding {{CacheObject}} references. # Same goes for other cache classes that were using keys, values or thereof bytes implicitly ({{IgniteTxEntry}}, {{GridCacheEntryInfo}}, etc) # Transformation of user object to a cache object in Ignite should be implemented in {{GridPortableProcessor}} which should be renamed to {{IgniteCacheObjectProcessor}}. {{IgniteCacheSerializarionManager}} should be removed. # Marshalling of {{CacheObject}} should take advantage of portable marshalling mechanism and always use only the serialized bytes stored in the {{CacheObject}}. In current implementation {{CacheObjectImpl}} should extend {{MessageAdapter}} (UPDATE WILL FOLLOW). # {{storeValueBytes}} flag should be removed from configuration. # Internal cache API should use {{CacheObject}} exclusively and wrap/unwrap it to/from user objects on the very top-level-proxy level (unwrap is for sure, wrap is subject to discuss). # {{cacheKeyBinaryEquality}} flag should be introduced to cache configuration (default true). When true, cache keys should not be deserialized and binary form of the object altogether with the hash code should be used to check key equality. {{GridCacheConcurrentMap}} should work explicitly with {{CacheObject}} only. # {{copyOnGet}} flag should be added to cache configuration (default true). When true, new value should be deserialized and returned to user on each cache operation implying return value. Ignite should maintain a list of known immutable types (such as {{Integer}}, {{String}}) for which {{copyOnGet}} is ignored. New annotation {{@IgniteImmutable}} should be introduced to mark immutable types for which this flag is also ignored. # When indexing is enabled, {{CacheObject}} should always keep deserialized version of user object. {{getField()}} method should be used in indexing to obtain indexed fields via reflection. {{getField()}} should maintain necessary reflection cache to keep current performance level. See {{IgniteH2Indexing}} for details. was: # Need to introduce interface {{CacheObject}} and {{KeyCacheObject}} that will hide the implementation details of cached object representation. {code} public interface CacheObject { public T value(GridCacheContext ctx); public T getField(String name); public byte[] valueBytes(); } public interface KeyCacheObject extends CacheObject { public int hashCode(); } {code} Implementation of this class must always store serialized form of the object and should be optionally store deserialized form of the object. Cache object must never keep the original reference of the user object. # Inside {{GridCacheMapEntry}} fields {{key}}, {{keyBytes}}, {{value}} and {{valueBytes}} should be replaced with corresponding {{CacheObject}} references. # Same goes for other cache classes that were using keys, values or thereof bytes implicitly ({{IgniteTxEntry}}, {{GridCacheEntryInfo}}, etc) # Transformation of user object to a cache object in Ignite should be implemented in {{GridPortableProcessor}} which should be renamed to {{IgniteCacheObjectProcessor}}. {{IgniteCacheSerializarionManager}} should be removed. # Marshalling of {{CacheObject}} should take advantage of portable marshalling mechanism and always use only the serialized bytes stored in the {{CacheObject}}. In current implementation {{CacheObjectImpl}} should extend {{MessageAdapter}} (UPDATE WILL FOLLOW). # {{storeValueBytes}} flag should be removed from configuration. # Internal cache API should use {{CacheObject}} exclusively and wrap/unwrap it to/from user objects on the very top-level-proxy level (unwrap is for sure, wrap is subject to discuss). # {{cacheKeyBinaryEquality}} flag should be introduced to cache configuration (default true). When true, cache keys should not be deserialized and binary form of the object altogether with the hash code should be used to check key equality. {{GridCacheConcurrentMap}} should be updated accordingly. # {{copyOnGet}} flag should be added to cache configuration (default true). When true, new value should be deserialized and returned to user on each cache operation implying return value. Ignite should maintain a list of known immutable types (such as {{Integer}}, {{String}}) for which {{copyOnGet}} is ignored. New annotation {{@IgniteImmutable}} should be introduced to mark immutable types for which this flag is also ignored. # When indexing is enabled, {{CacheObject}} should always keep deserialized version of user object. {{getField()}} method should be used in indexing to obtain indexed fields via reflection. {{getField()}} should maintain necessary reflection cache to keep current performance level. See {{IgniteH2Indexing}} for details. > Support store-by-value mode > --------------------------- > > Key: IGNITE-51 > URL: https://issues.apache.org/jira/browse/IGNITE-51 > Project: Ignite > Issue Type: Sub-task > Components: cache > Reporter: Semen Boikov > Assignee: Alexey Goncharuk > Fix For: sprint-2 > > > # Need to introduce interface {{CacheObject}} and {{KeyCacheObject}} that will hide the implementation details of cached object representation. > {code} > public interface CacheObject { > public T value(GridCacheContext ctx); > public T getField(String name); > public byte[] valueBytes(); > } > public interface KeyCacheObject extends CacheObject { > public int hashCode(); > } > {code} > Implementation of this class must always store serialized form of the object and should be optionally store deserialized form of the object. Cache object must never keep the original reference of the user object. > # Inside {{GridCacheMapEntry}} fields {{key}}, {{keyBytes}}, {{value}} and {{valueBytes}} should be replaced with corresponding {{CacheObject}} references. > # Same goes for other cache classes that were using keys, values or thereof bytes implicitly ({{IgniteTxEntry}}, {{GridCacheEntryInfo}}, etc) > # Transformation of user object to a cache object in Ignite should be implemented in {{GridPortableProcessor}} which should be renamed to {{IgniteCacheObjectProcessor}}. {{IgniteCacheSerializarionManager}} should be removed. > # Marshalling of {{CacheObject}} should take advantage of portable marshalling mechanism and always use only the serialized bytes stored in the {{CacheObject}}. In current implementation {{CacheObjectImpl}} should extend {{MessageAdapter}} (UPDATE WILL FOLLOW). > # {{storeValueBytes}} flag should be removed from configuration. > # Internal cache API should use {{CacheObject}} exclusively and wrap/unwrap it to/from user objects on the very top-level-proxy level (unwrap is for sure, wrap is subject to discuss). > # {{cacheKeyBinaryEquality}} flag should be introduced to cache configuration (default true). When true, cache keys should not be deserialized and binary form of the object altogether with the hash code should be used to check key equality. {{GridCacheConcurrentMap}} should work explicitly with {{CacheObject}} only. > # {{copyOnGet}} flag should be added to cache configuration (default true). When true, new value should be deserialized and returned to user on each cache operation implying return value. Ignite should maintain a list of known immutable types (such as {{Integer}}, {{String}}) for which {{copyOnGet}} is ignored. New annotation {{@IgniteImmutable}} should be introduced to mark immutable types for which this flag is also ignored. > # When indexing is enabled, {{CacheObject}} should always keep deserialized version of user object. {{getField()}} method should be used in indexing to obtain indexed fields via reflection. {{getField()}} should maintain necessary reflection cache to keep current performance level. See {{IgniteH2Indexing}} for details. -- This message was sent by Atlassian JIRA (v6.3.4#6332)