From d2d77eb608b848640b0a2d22cbd2ea68d5b59b31 Mon Sep 17 00:00:00 2001 From: Andreas Mager Date: Wed, 1 Feb 2017 15:46:15 +0100 Subject: [PATCH] broker/IMessagesStore: code formatter used --- .../java/io/moquette/spi/IMessagesStore.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/broker/src/main/java/io/moquette/spi/IMessagesStore.java b/broker/src/main/java/io/moquette/spi/IMessagesStore.java index 7693b33b..e89e073d 100644 --- a/broker/src/main/java/io/moquette/spi/IMessagesStore.java +++ b/broker/src/main/java/io/moquette/spi/IMessagesStore.java @@ -13,12 +13,12 @@ * * You may elect to redistribute this code under either of these licenses. */ + package io.moquette.spi; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.handler.codec.mqtt.MqttQoS; - import java.io.Serializable; import java.nio.ByteBuffer; import java.util.Collection; @@ -29,13 +29,14 @@ import java.util.Collection; public interface IMessagesStore { class StoredMessage implements Serializable { + private static final long serialVersionUID = 1755296138639817304L; final MqttQoS m_qos; final byte[] m_payload; final String m_topic; private boolean m_retained; private String m_clientID; - //Optional attribute, available only fo QoS 1 and 2 + // Optional attribute, available only fo QoS 1 and 2 private Integer m_msgID; private MessageGUID m_guid; @@ -95,41 +96,42 @@ public interface IMessagesStore { @Override public String toString() { - return "PublishEvent{" + - "m_msgID=" + m_msgID + - ", clientID='" + m_clientID + '\'' + - ", m_retain=" + m_retained + - ", m_qos=" + m_qos + - ", m_topic='" + m_topic + '\'' + - '}'; + return "PublishEvent{" + "m_msgID=" + m_msgID + ", clientID='" + m_clientID + '\'' + ", m_retain=" + + m_retained + ", m_qos=" + m_qos + ", m_topic='" + m_topic + '\'' + '}'; } } /** * Used to initialize all persistent store structures - * */ + */ void initStore(); /** - * Persist the message. - * If the message is empty then the topic is cleaned, else it's stored. - * @param topic for the retained. - * @param guid of the message to mark as retained. + * Persist the message. If the message is empty then the topic is cleaned, else it's stored. + * + * @param topic + * for the retained. + * @param guid + * of the message to mark as retained. */ void storeRetained(String topic, MessageGUID guid); /** * Return a list of retained messages that satisfy the condition. - * @param condition the condition to match during the search. + * + * @param condition + * the condition to match during the search. * @return the collection of matching messages. */ Collection searchMatching(IMatchingCondition condition); /** * Persist the message. - * @param storedMessage the message to store for future usage. + * + * @param storedMessage + * the message to store for future usage. * @return the unique id in the storage (guid). - * */ + */ MessageGUID storePublishForFuture(StoredMessage storedMessage); void dropMessagesInSession(String clientID);