{"action":"created","issue":{"url":"https://api.github.com/repos/infinispan/infinispan/issues/4648","repository_url":"https://api.github.com/repos/infinispan/infinispan","labels_url":"https://api.github.com/repos/infinispan/infinispan/issues/4648/labels{/name}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/4648/comments","events_url":"https://api.github.com/repos/infinispan/infinispan/issues/4648/events","html_url":"https://github.com/infinispan/infinispan/pull/4648","id":188247558,"number":4648,"title":"ISPN-6903 (2/3) New marshaller","user":{"login":"galderz","id":50187,"avatar_url":"https://avatars.githubusercontent.com/u/50187?v=3","gravatar_id":"","url":"https://api.github.com/users/galderz","html_url":"https://github.com/galderz","followers_url":"https://api.github.com/users/galderz/followers","following_url":"https://api.github.com/users/galderz/following{/other_user}","gists_url":"https://api.github.com/users/galderz/gists{/gist_id}","starred_url":"https://api.github.com/users/galderz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galderz/subscriptions","organizations_url":"https://api.github.com/users/galderz/orgs","repos_url":"https://api.github.com/users/galderz/repos","events_url":"https://api.github.com/users/galderz/events{/privacy}","received_events_url":"https://api.github.com/users/galderz/received_events","type":"User","site_admin":false},"labels":[{"id":118835080,"url":"https://api.github.com/repos/infinispan/infinispan/labels/Ready%20for%20Review","name":"Ready for Review","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-09T13:28:48Z","updated_at":"2016-11-17T13:31:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/4648","html_url":"https://github.com/infinispan/infinispan/pull/4648","diff_url":"https://github.com/infinispan/infinispan/pull/4648.diff","patch_url":"https://github.com/infinispan/infinispan/pull/4648.patch"},"body":"Once #4620 has been integrated we can remove some noise from this PR.\r\n\r\nThis PR focuses on simplifying the ideas introduced in #4530 and handle the feedback provided. To be more precise, this is what has been done:\r\n- Make `ClientEventsOOMTest` use replicated cache.\r\n- Merge BytesEncoding logic BytesObject\\* classes.\r\n- Get rid of `InternalMarshaller` class and move code to `GlobalMarshaller`.\r\n- Rename from `checkCapacity` to `ensureCapacity` in `BytesObjectOutput`.\r\n- Return -1 (instead of throwing `EOFException`) in `JBossByteInput.read()` implementation when it reads to far from the backing array.\r\n- `ClusterEvent.Externalizer` now uses MarshallUtil.marshallEnum/unmarshallEnum instead.\r\n- `TransactionInfo` now calls `MarshallUtil.marshallCollection()`\r\n-  Move internal/\\* classes to marshaller/core and use package private access for better encapsulation.\r\n- Separate external and internal externalizer tables.\r\n- Provided a dedicated, simplified, implementation of Class to AdvancedExternalizer lookup map.\r\n- Class to AdvancedExternalizer map has the capability to produce a reverse map which maps from AdvancedExternalizer ID to AdvancedExternalizer (for reads).\r\n- Reverse map implementation varies depending on whether max AdvancedExternalizer ID is known (e.g. internal externalizers) or not (e.g. external externalizers). The former case is optimised to be a simple array implementation, whereas the latter hashes IDs to deal with potential large IDs since we can't make assumptions.\r\n- Deal with null in GlobalMarshaller.\r\n- Deal with primitives independently (e.g. not via Externalizer) so that you don't have to do weird things in the JBoss Marshaller external marshaller.\r\n- Dealing with primitives independently reduces number of look ups from 2 to 1.\r\n- External marshaller is now configurable.\r\n- Remove ExternalizerTable.\r\n- SMALL and MEDIUM constants used in `Primitives` class to deal with feedback [here](https://github.com/infinispan/infinispan/pull/4530#r78183198).\r\n- `writeObjectArray` and similar methods now writes `len - 1` instead, so that you don't need a branch when creating new primitive arrays.\r\n- Rewinding in ExternalJBossMarshaller now achieved without the need of extra interfaces and using information that can be extracted out of `RiverUnmarshaller`.\r\n- Bunch up externalizer IDs, remove unused IDs and removed unused externalizers to help with better sizing decisions of Class to Externalizer map.\r\n"},"comment":{"url":"https://api.github.com/repos/infinispan/infinispan/issues/comments/261246687","html_url":"https://github.com/infinispan/infinispan/pull/4648#issuecomment-261246687","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/4648","id":261246687,"user":{"login":"galderz","id":50187,"avatar_url":"https://avatars.githubusercontent.com/u/50187?v=3","gravatar_id":"","url":"https://api.github.com/users/galderz","html_url":"https://github.com/galderz","followers_url":"https://api.github.com/users/galderz/followers","following_url":"https://api.github.com/users/galderz/following{/other_user}","gists_url":"https://api.github.com/users/galderz/gists{/gist_id}","starred_url":"https://api.github.com/users/galderz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galderz/subscriptions","organizations_url":"https://api.github.com/users/galderz/orgs","repos_url":"https://api.github.com/users/galderz/repos","events_url":"https://api.github.com/users/galderz/events{/privacy}","received_events_url":"https://api.github.com/users/galderz/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T13:31:08Z","updated_at":"2016-11-17T13:31:08Z","body":"> GlobalMarshaller.objectFromInputStream():\r\n> Do you mind to create a JIRA to remove the copy and use the InputStream directly (create StreamByteObjectInput?)\r\n\r\n^ [ISPN-7212](https://issues.jboss.org/browse/ISPN-7212)\r\n\r\n> Isn't the String[] missing in the Primitives?\r\n\r\n^ [ISPN-7213](https://issues.jboss.org/browse/ISPN-7213)"}}
{"actor":{"display_login":"galderz"}}