Class ReplicationTarget
- java.lang.Object
-
- org.apache.accumulo.core.replication.ReplicationTarget
-
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
public class ReplicationTarget extends Object implements org.apache.hadoop.io.Writable
Container for where some work needs to be replicated
-
-
Constructor Summary
Constructors Constructor Description ReplicationTarget()ReplicationTarget(String peerName, String remoteIdentifier, TableId sourceTableId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static ReplicationTargetfrom(String s)Deserialize a ReplicationTargetstatic ReplicationTargetfrom(org.apache.hadoop.io.Text t)Deserialize a ReplicationTargetStringgetPeerName()StringgetRemoteIdentifier()TableIdgetSourceTableId()inthashCode()voidreadFields(DataInput in)voidsetPeerName(String peerName)voidsetRemoteIdentifier(String remoteIdentifier)voidsetSourceTableId(TableId sourceTableId)StringtoString()org.apache.hadoop.io.TexttoText()Convenience method to serialize a ReplicationTarget toTextusing theWritablemethods without caring about performance penalties due to excessive object creationvoidwrite(DataOutput out)
-
-
-
Method Detail
-
getPeerName
public String getPeerName()
-
setPeerName
public void setPeerName(String peerName)
-
getRemoteIdentifier
public String getRemoteIdentifier()
-
setRemoteIdentifier
public void setRemoteIdentifier(String remoteIdentifier)
-
getSourceTableId
public TableId getSourceTableId()
-
setSourceTableId
public void setSourceTableId(TableId sourceTableId)
-
write
public void write(DataOutput out) throws IOException
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
from
public static ReplicationTarget from(org.apache.hadoop.io.Text t)
Deserialize a ReplicationTarget- Parameters:
t- Serialized copy- Returns:
- the deserialized version
-
from
public static ReplicationTarget from(String s)
Deserialize a ReplicationTarget- Parameters:
s- Serialized copy- Returns:
- the deserialized version
-
toText
public org.apache.hadoop.io.Text toText()
Convenience method to serialize a ReplicationTarget toTextusing theWritablemethods without caring about performance penalties due to excessive object creation- Returns:
- The serialized representation of the object
-
-