If a serialized object is stored in an on-heap cache then it will be wrapped by BinaryObjectImp but if it’s an off-heap cache then BinaryObjectOffHeapImpl is used instead.
— Denis > On Apr 14, 2017, at 12:32 AM, Vyacheslav Daradur <[email protected]> wrote: > >>> when it’s stored in memory in a specific cache partition > Does that mean that any serialized object is always stored IN MEMORY as is > wrapped by BinaryObjectImpl? > > > > 2017-04-14 3:42 GMT+03:00 Denis Magda <[email protected]>: > >> A serialized object is always wrapped by BinaryObjectImpl when it’s stored >> in memory in a specific cache partition or you access it from your >> application in a form of BinaryObject. However, when you transfer the >> object over the wire or put it into a persistent store (withKeepBinary >> property enabled) then only the byte array is used. >> >> — >> Denis >> >>> On Apr 13, 2017, at 12:21 AM, Vyacheslav Daradur <[email protected]> >> wrote: >>> >>> Denis, thank you for answers. >>> >>> I meant another. >>> >>> For example: >>> Cache queries use a BinaryObjectImpl and a withKeepBinary-mode use it, so >>> looks like all actions on serialized object are make via a >> BinaryObjectImpl. >>> >>> Does a serialized object always is stored as BinaryObjectImpl or it will >> be >>> wrapped on demand? >>> >>> 2017-04-12 22:34 GMT+03:00 Denis Magda <[email protected]>: >>> >>>> A Java wrapper around an actual binary byte array with some additional >>>> fields and methods to work with the serialized data. >>>> >>>> — >>>> Denis >>>> >>>>> On Apr 12, 2017, at 8:33 AM, Vyacheslav Daradur <[email protected]> >>>> wrote: >>>>> >>>>> In what cases BinaryObjecImpl is used? >>>>> >>>>> 2017-04-12 18:08 GMT+03:00 Denis Magda <[email protected]>: >>>>> >>>>>> Hi, >>>>>> >>>>>> A cache entry is always stored in a binary format (byte array) in a >>>> cache. >>>>>> Even when you transfer an entry from one node to another, as a result >> of >>>>>> cache.put(…), operation the entry will be serialized into the binary >>>> format >>>>>> and transferred over the wire. >>>>>> >>>>>> — >>>>>> Denis >>>>>> >>>>>>> On Apr 12, 2017, at 1:11 AM, Vyacheslav Daradur <[email protected] >>> >>>>>> wrote: >>>>>>> >>>>>>> Hello Igniters! >>>>>>> >>>>>>> I have one conceptual question: >>>>>>> >>>>>>> When we put an object in IgniteCache, how it is stored? >>>>>>> >>>>>>> As I understand, after marshalling we have an array of bytes, >>>>>>> 1) in a local node it is wrapped in BinaryObjectImpl and stored in >>>> memory >>>>>>> 2) it is sent to remote node as byte array where it will be wrapped >> in >>>>>>> BinaryObjectImpl and be stored in memory >>>>>>> >>>>>>> -- >>>>>>> Best Regards, Vyacheslav >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Best Regards, Vyacheslav >>>> >>>> >>> >>> >>> -- >>> Best Regards, Vyacheslav >> >> > > > -- > Best Regards, Vyacheslav
