ningyougang commented on a change in pull request #5061:
URL: https://github.com/apache/openwhisk/pull/5061#discussion_r570695549
##########
File path:
common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala
##########
@@ -428,6 +428,61 @@ object EventMessage extends DefaultJsonProtocol {
def parse(msg: String) = Try(format.read(msg.parseJson))
}
+case class InvokerResourceMessage(status: String,
+ freeMemory: Long,
+ busyMemory: Long,
+ inProgressMemory: Long,
+ tags: Seq[String],
+ dedicatedNamespaces: Seq[String])
+ extends Message {
+
+ /**
+ * Serializes message to string. Must be idempotent.
+ */
+ override def serialize: String =
InvokerResourceMessage.serdes.write(this).compactPrint
+
+ def canEqual(a: Any) = a.isInstanceOf[InvokerResourceMessage]
+
+ override def equals(that: Any): Boolean =
+ that match {
+ case that: InvokerResourceMessage => {
+ that.canEqual(this) &&
+ this.status == that.status &&
+ this.freeMemory == that.freeMemory &&
+ this.busyMemory == that.busyMemory &&
+ this.inProgressMemory == that.inProgressMemory &&
+ this.tags.toSet == that.tags.toSet
+ this.dedicatedNamespaces.toSet == that.dedicatedNamespaces.toSet
+ }
+ case _ => false
+ }
+
+ override def hashCode: Int = {
+ var result = 1;
Review comment:
I already removed the equals and hashCode.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]