Class CMFileSyncEventFileBlockChecksum
java.lang.Object
kr.ac.konkuk.ccslab.cm.entity.CMObject
kr.ac.konkuk.ccslab.cm.event.CMEvent
kr.ac.konkuk.ccslab.cm.event.filesync.CMFileSyncEvent
kr.ac.konkuk.ccslab.cm.event.filesync.CMFileSyncEventFileBlockChecksum
This class represents a CMFileSyncEvent with which the server sends the client
an array of block checksums of a file.
-
Field Summary
Fields inherited from class kr.ac.konkuk.ccslab.cm.event.filesync.CMFileSyncEvent
COMPLETE_FILE_SYNC, COMPLETE_NEW_FILE, COMPLETE_UPDATE_FILE, END_FILE_BLOCK_CHECKSUM, END_FILE_BLOCK_CHECKSUM_ACK, END_FILE_LIST, END_FILE_LIST_ACK, END_LOCAL_MODE_LIST, END_LOCAL_MODE_LIST_ACK, END_ONLINE_MODE_LIST, END_ONLINE_MODE_LIST_ACK, FILE_BLOCK_CHECKSUM, FILE_ENTRIES, FILE_ENTRIES_ACK, LOCAL_MODE_LIST, LOCAL_MODE_LIST_ACK, ONLINE_MODE_LIST, ONLINE_MODE_LIST_ACK, REQUEST_NEW_FILES, SKIP_UPDATE_FILE, START_FILE_BLOCK_CHECKSUM, START_FILE_BLOCK_CHECKSUM_ACK, START_FILE_LIST, START_FILE_LIST_ACK, UPDATE_EXISTING_FILE
Fields inherited from class kr.ac.konkuk.ccslab.cm.event.CMEvent
m_bytes, m_nByteNum, m_nID, m_strDistributionGroup, m_strDistributionSession, m_strHandlerGroup, m_strHandlerSession, m_strReceiver, m_strSender
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
gets the array of file block checksum in this event.int
gets an index of a file entry for synchronization.int
gets the number of file blocks in this event.int
gets the index of a starting file block in this event.int
gets the total number of blocks of the file.int
hashCode()
protected void
void
setChecksumArray
(CMFileSyncBlockChecksum[] checksumArray) void
setFileEntryIndex
(int fileEntryIndex) void
setNumCurrentBlocks
(int numCurrentBlocks) void
setStartBlockIndex
(int startBlockIndex) void
setTotalNumBlocks
(int totalNumBlocks) toString()
protected void
unmarshallBody
(ByteBuffer msg) Methods inherited from class kr.ac.konkuk.ccslab.cm.event.CMEvent
allocate, getDistributionGroup, getDistributionSession, getHandlerGroup, getHandlerSession, getID, getInt2BytesFromByteBuffer, getReceiver, getSender, getStringFromByteBuffer, marshall, marshallHeader, putInt2BytesToByteBuffer, putStringToByteBuffer, setByteNum, setDistributionGroup, setDistributionSession, setHandlerGroup, setHandlerSession, setID, setReceiver, setSender, unmarshall, unmarshallHeader
-
Constructor Details
-
CMFileSyncEventFileBlockChecksum
public CMFileSyncEventFileBlockChecksum() -
CMFileSyncEventFileBlockChecksum
-
-
Method Details
-
getByteNum
public int getByteNum()- Overrides:
getByteNum
in classCMEvent
-
marshallBody
protected void marshallBody()- Specified by:
marshallBody
in classCMEvent
-
unmarshallBody
- Specified by:
unmarshallBody
in classCMEvent
-
toString
-
equals
-
hashCode
public int hashCode() -
getFileEntryIndex
public int getFileEntryIndex()gets an index of a file entry for synchronization.- Returns:
- an index of a file entry for synchronization
-
setFileEntryIndex
public void setFileEntryIndex(int fileEntryIndex) -
getTotalNumBlocks
public int getTotalNumBlocks()gets the total number of blocks of the file.- Returns:
- total number of blocks of the file
-
setTotalNumBlocks
public void setTotalNumBlocks(int totalNumBlocks) -
getStartBlockIndex
public int getStartBlockIndex()gets the index of a starting file block in this event.- Returns:
- an index of a starting file block
-
setStartBlockIndex
public void setStartBlockIndex(int startBlockIndex) -
getNumCurrentBlocks
public int getNumCurrentBlocks()gets the number of file blocks in this event.- Returns:
- number of file blocks in this event.
-
setNumCurrentBlocks
public void setNumCurrentBlocks(int numCurrentBlocks) -
getChecksumArray
gets the array of file block checksum in this event.- Returns:
- an array of file block checksum
-
setChecksumArray
-