Package io.aether.syncmap
Class SyncContainer<V>
- java.lang.Object
-
- io.aether.syncmap.SyncContainer<V>
-
public class SyncContainer<V> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SyncContainer(V data, int ownerSid, long seqNo, boolean deleted)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V> SyncContainer<V>deserialize(io.aether.net.fastMeta.FastMetaType<V> dataMeta, io.aether.utils.dataio.DataIn in)booleanequals(java.lang.Object o)VgetData()intgetOwnerSid()longgetSeqNo()inthashCode()booleanisDeleted()static <V> voidserialize(SyncContainer<V> container, io.aether.net.fastMeta.FastMetaType<V> dataMeta, io.aether.utils.dataio.DataOut out)Serializes the container metadata fields (ownerSid, seqNo, deleted) followed by the user data using the provided FastMetaType.java.lang.StringtoString()SyncContainer<V>withData(V newData)SyncContainer<V>withDeleted(boolean newDeleted)SyncContainer<V>withOwnerSid(int newOwnerSid)SyncContainer<V>withSeqNo(long newSeqNo)
-
-
-
Constructor Detail
-
SyncContainer
public SyncContainer(V data, int ownerSid, long seqNo, boolean deleted)
-
-
Method Detail
-
getData
public V getData()
-
getOwnerSid
public int getOwnerSid()
-
getSeqNo
public long getSeqNo()
-
isDeleted
public boolean isDeleted()
-
withData
public SyncContainer<V> withData(V newData)
-
withSeqNo
public SyncContainer<V> withSeqNo(long newSeqNo)
-
withOwnerSid
public SyncContainer<V> withOwnerSid(int newOwnerSid)
-
withDeleted
public SyncContainer<V> withDeleted(boolean newDeleted)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
serialize
public static <V> void serialize(SyncContainer<V> container, io.aether.net.fastMeta.FastMetaType<V> dataMeta, io.aether.utils.dataio.DataOut out)
Serializes the container metadata fields (ownerSid, seqNo, deleted) followed by the user data using the provided FastMetaType.
-
deserialize
public static <V> SyncContainer<V> deserialize(io.aether.net.fastMeta.FastMetaType<V> dataMeta, io.aether.utils.dataio.DataIn in)
-
-