This commit is contained in:
Clebert Suconic 2019-09-23 10:40:09 -04:00
commit 77376e5d70
4 changed files with 11 additions and 5 deletions

View File

@ -83,9 +83,15 @@ public interface ICoreMessage extends Message {
int getEndOfBodyPosition();
/**
* Used on large messages treatment
* Used on large messages treatment.
* this method is used to transfer properties from a temporary CoreMessage to a definitive one.
* This is used when before a Message was defined as a LargeMessages, its properties are then moved from the
* Temporary message to its final LargeMessage object.
*
* Be careful as this will not perform a copy of the Properties.
* For real copy, use the copy methods or copy constructors.
*/
void copyHeadersAndProperties(Message msg);
void moveHeadersAndProperties(Message msg);
void sendBuffer_1X(ByteBuf sendBuffer);

View File

@ -450,7 +450,7 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
}
@Override
public void copyHeadersAndProperties(final Message msg) {
public void moveHeadersAndProperties(final Message msg) {
messageID = msg.getMessageID();
address = msg.getAddressSimpleString();
userID = (UUID) msg.getUserID();

View File

@ -549,7 +549,7 @@ public class JournalStorageManager extends AbstractJournalStorageManager {
LargeServerMessageImpl largeMessage = (LargeServerMessageImpl) createLargeMessage();
largeMessage.copyHeadersAndProperties(message);
largeMessage.moveHeadersAndProperties(message);
largeMessage.setMessageID(id);

View File

@ -291,7 +291,7 @@ public class NullStorageManager implements StorageManager {
public LargeServerMessage createLargeMessage(final long id, final Message message) {
NullStorageLargeServerMessage largeMessage = new NullStorageLargeServerMessage();
largeMessage.copyHeadersAndProperties(message);
largeMessage.moveHeadersAndProperties(message);
largeMessage.setMessageID(id);