
com.joe.easysocket.server.common.spi.ChildData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of socket-common Show documentation
Show all versions of socket-common Show documentation
socket框架,方便快速开发socket服务端和客户端
The newest version!
package com.joe.easysocket.server.common.spi;
import org.apache.curator.utils.PathUtils;
import lombok.Data;
/**
* @author joe
*/
@Data
public class ChildData implements Comparable {
private final String path;
private final byte[] data;
public ChildData(String path, byte[] data) {
this.path = PathUtils.validatePath(path);
this.data = data;
}
@Override
public int compareTo(ChildData rhs) {
if (this == rhs) {
return 0;
}
if (rhs == null || getClass() != rhs.getClass()) {
return -1;
}
return path.compareTo(rhs.path);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy