Move atomix-storage to a top-level directory The directory structure no longer makes sense here, move the single component to a top-level directory. JIRA: CONTROLLER-2072 Change-Id: Ib011d88908547059e21a11820b0531c6edb5a680 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Rename Namespace to KryoJournalSerdes Reduce naming confusion -- Namespace really is a Kryo-based implementation of JournalSerdes. KryoJournalSerdesBuilder is separated out so that Kryo interfaces are not leaked outside of the package. JIRA: CONTROLLER-2072 Change-Id: I75e7a6f30d6319c4284acd76ec098224380e3b70 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Add RegisteredType Reduce verbosity by introducing a private DTO to hold the combination of a Serializer and its associated classes. JIRA: CONTROLLER-2072 Change-Id: I9cdf32d6107740d5a07cfdb884bd4641c242450e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove Namespace.RegistrationBlock We always create a single block. Remove the unused complexity here and move Builder class to the bottom so as not to clutter things. JIRA: CONTROLLER-2072 Change-Id: Ia7d31aa717aeeb17f6d2419d05818f88b0c27c4b Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove Namespace.FLOATING_ID We do not allow for dynamically-allocated IDs. Remove the constant and the corresponding special-case. JIRA: CONTROLLER-2072 Change-Id: I7de4ec77bd6934cd89c78de406cf9e0c73fa2cd4 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not leak Kryo from atomix.storage Rather than dealing with Kryo serializers, introduce separate interfaces to deal with input/output and serialization logic. This allows us to be in explicit control as to what interface do we support towards segmented journal persistence. It further means Kryo is now a pure implementation thing and can be removed without changing the APIs. JIRA: CONTROLLER-2072 Change-Id: Ib4550f5f29d33d792f37110b5a14756654a5b87e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Introduce atomix.storage.journal.JournalSerdes The interfaces are tightly coupled with namespace implementation, which in turn is tightly coupled to Kryo. As a first step to disconnect these three, introduce JournalSerdes, which acts as the public API implemented by Namespace. This allows us to hide atomix.utils.serializer package at least from OSGi. Change-Id: I9668ba2eb3e0a58d7ed27ee09ec1bb3cee069eb4 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix warnings in StorageException Exceptions are serializable and therefore should define serialVersionUID. Fix this omission. Change-Id: I24daa7ca923d6df71beaf7325b57fc306564f366 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove Namespace.populate() populate() is implementation specific and used only internally. Integrate it into the constructor. JIRA: CONTROLLER-2072 Change-Id: I6a78a506d2a7936f84dac332928848af832a21aa Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Position is a simple record This is a pure DTO, reduce verbosity by turning it into a plain record. Change-Id: Ife6286343f1bc3f88c9586c6a011ef08b182ac1d Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove DelegatingJournal{,Reader,Writer} These classes are not used anywhere, remove them to improve code navigability. JIRA: CONTROLLER-2071 Change-Id: I45c3f9953c6794ed55053ac1193d14d83b844ad0 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove Namespace.Builder.setRegistrationRequired() We want users to always register serializers, remove the option to not do so. JIRA: CONTROLLER-2072 Change-Id: I8aeb47045353b058556498bc4e6b64307646d924 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove Namespace.DEFAULT We want users to explicitly set up their namespaces, hence remove the default namespace. JIRA: CONTROLLER-2072 Change-Id: Id97bc5d5696dd8f12a34bf8d3378344da3396b49 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove Namespace.Builder.setCompatible() We want users to explicitly take a hold of their serialization format, hence we do not want to create forward/backward compatible streams. They are prohibitively costly in our use case anyway. JIRA: CONTROLLER-2072 Change-Id: Ie533bf52f2b7123f162e9275b39952cd2193679a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove Namespace.Builder.nextId() The facility to assign ids is not used by us, remove it, as it seems to be a leak from Kryo. JIRA: CONTROLLER-2072 Change-Id: I5069e3c0dfa395a56c98498d566b615651bda820 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>