X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-segmented-journal%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fakka%2Fsegjournal%2FLongSerdes.java;fp=opendaylight%2Fmd-sal%2Fsal-akka-segmented-journal%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fakka%2Fsegjournal%2FLongSerdes.java;h=ccd970af6f00e44485e2fcda2cfa8a03d38c7c4c;hb=014a5d10aa01fcb9b1a7f8bae97e13ca3b7aa698;hp=0000000000000000000000000000000000000000;hpb=0bacb5d7a91f1bc0fcd13763b1cdfcd74ed2e0e6;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/LongSerdes.java b/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/LongSerdes.java new file mode 100644 index 0000000000..ccd970af6f --- /dev/null +++ b/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/LongSerdes.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.akka.segjournal; + +import io.atomix.storage.journal.JournalSerdes.EntryInput; +import io.atomix.storage.journal.JournalSerdes.EntryOutput; +import io.atomix.storage.journal.JournalSerdes.EntrySerdes; +import java.io.IOException; + +final class LongSerdes implements EntrySerdes { + @Override + public Long read(final EntryInput input) throws IOException { + return input.readLong(); + } + + @Override + public void write(final EntryOutput output, final Long entry) throws IOException { + output.writeLong(entry); + } +}