Package com.linkedin.davinci.consumer
Class VeniceChangeCoordinate
- java.lang.Object
-
- com.linkedin.davinci.consumer.VeniceChangeCoordinate
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
public class VeniceChangeCoordinate extends java.lang.Object implements java.io.Externalizable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description VeniceChangeCoordinate()
protected
VeniceChangeCoordinate(java.lang.String topic, PubSubPosition pubSubPosition, java.lang.Integer partition)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
comparePosition(VeniceChangeCoordinate other)
static java.lang.String
convertVeniceChangeCoordinateToStringAndEncode(VeniceChangeCoordinate veniceChangeCoordinate)
static VeniceChangeCoordinate
decodeStringAndConvertToVeniceChangeCoordinate(java.lang.String offsetString)
java.lang.Integer
getPartition()
protected PubSubPosition
getPosition()
java.lang.String
getStoreName()
protected java.lang.String
getTopic()
void
readExternal(java.io.ObjectInput in)
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Constructor Detail
-
VeniceChangeCoordinate
public VeniceChangeCoordinate()
-
VeniceChangeCoordinate
protected VeniceChangeCoordinate(java.lang.String topic, PubSubPosition pubSubPosition, java.lang.Integer partition)
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
getPartition
public java.lang.Integer getPartition()
-
getStoreName
public java.lang.String getStoreName()
-
comparePosition
public int comparePosition(VeniceChangeCoordinate other)
- Parameters:
other
- the other position to compare to- Returns:
- returns 0 if the positions are equal, -1 if this position is less than the other position, and 1 if this position is greater than the other position
-
getTopic
protected java.lang.String getTopic()
-
getPosition
protected PubSubPosition getPosition()
-
convertVeniceChangeCoordinateToStringAndEncode
public static java.lang.String convertVeniceChangeCoordinateToStringAndEncode(VeniceChangeCoordinate veniceChangeCoordinate) throws java.io.IOException
- Throws:
java.io.IOException
-
decodeStringAndConvertToVeniceChangeCoordinate
public static VeniceChangeCoordinate decodeStringAndConvertToVeniceChangeCoordinate(java.lang.String offsetString) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-