Package net.spy.memcached.tapmessage
Class RequestMessage
- java.lang.Object
-
- net.spy.memcached.compat.SpyObject
-
- net.spy.memcached.tapmessage.BaseMessage
-
- net.spy.memcached.tapmessage.RequestMessage
-
public class RequestMessage extends BaseMessage
A tap request message that is used to start tap streams, perform sasl authentication, and maintain the health of tap streams.
-
-
Field Summary
Fields Modifier and Type Field Description private long
backfilldate
private java.util.List<TapRequestFlag>
flagList
private boolean
hasBackfill
private boolean
hasFlags
private boolean
hasVBucketCheckpoints
private boolean
hasVBucketList
private java.lang.String
name
private short[]
vblist
private java.util.Map<java.lang.Short,java.lang.Long>
vBucketCheckpoints
-
Fields inherited from class net.spy.memcached.tapmessage.BaseMessage
cas, datatype, extralength, HEADER_LENGTH, keylength, magic, opaque, opcode, totalbody, vbucket
-
-
Constructor Summary
Constructors Constructor Description RequestMessage()
Create a tap request message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
getBytes()
Encodes the message into binary.java.util.List<TapRequestFlag>
getFlags()
Returns the flags for this message.void
setBackfill(long date)
Stream all keys inserted into the server after a given date.void
setFlags(TapRequestFlag f)
Sets the flags for the tap stream.void
setName(java.lang.String n)
Sets a name for this tap stream.void
setvBucketCheckpoints(java.util.Map<java.lang.Short,java.lang.Long> vbchkpnts)
Sets a map of vbucket checkpoints.void
setVbucketlist(short[] vbs)
Sets a list of vbuckets to stream keys from.-
Methods inherited from class net.spy.memcached.tapmessage.BaseMessage
decodeInt, decodeIntHostOrder, decodeLong, decodeShort, getCas, getDatatype, getExtralength, getKeylength, getMagic, getMessageLength, getOpaque, getOpcode, getTotalbody, getVbucket, setCas, setDatatype, setExtralength, setMagic, setOpaque, setOpcode, setTotalbody, setVbucket
-
-
-
-
Field Detail
-
hasBackfill
private boolean hasBackfill
-
hasVBucketList
private boolean hasVBucketList
-
hasVBucketCheckpoints
private boolean hasVBucketCheckpoints
-
hasFlags
private boolean hasFlags
-
flagList
private java.util.List<TapRequestFlag> flagList
-
vblist
private short[] vblist
-
name
private java.lang.String name
-
backfilldate
private long backfilldate
-
vBucketCheckpoints
private java.util.Map<java.lang.Short,java.lang.Long> vBucketCheckpoints
-
-
Method Detail
-
setFlags
public void setFlags(TapRequestFlag f)
Sets the flags for the tap stream. These flags decide what kind of tap stream will be received.- Parameters:
f
- The flags to use for this tap stream.
-
getFlags
public java.util.List<TapRequestFlag> getFlags()
Returns the flags for this message.- Returns:
- An int value of flags set for this tap message.
-
setBackfill
public void setBackfill(long date)
Stream all keys inserted into the server after a given date.- Parameters:
date
- - The date to stream keys from. Null to stream all keys.
-
setVbucketlist
public void setVbucketlist(short[] vbs)
Sets a list of vbuckets to stream keys from.- Parameters:
vbs
- - A list of vbuckets.
-
setvBucketCheckpoints
public void setvBucketCheckpoints(java.util.Map<java.lang.Short,java.lang.Long> vbchkpnts)
Sets a map of vbucket checkpoints.- Parameters:
vbchkpnts
- - A map of vbucket checkpoint identifiers
-
setName
public void setName(java.lang.String n)
Sets a name for this tap stream. If the tap stream fails this name can be used to try to restart the tap stream from where it last left off.- Parameters:
n
- The name for the tap stream.
-
getBytes
public java.nio.ByteBuffer getBytes()
Encodes the message into binary.- Specified by:
getBytes
in classBaseMessage
- Returns:
- The ByteBuffer representation of the message.
-
-