com.github.lontime.extredisson.common.InternalRPCUtils Maven / Gradle / Ivy
The newest version!
package com.github.lontime.extredisson.common;
import com.github.lontime.shaded.org.redisson.api.StreamMessageId;
/**
* InternalRPCUtils.
*
* @author lontime
* @since 1.0
*/
public class InternalRPCUtils {
/**
* parseMessageId.
*
* @param id id
* @return StreamMessageId
*/
public static StreamMessageId parseMessageId(String id) {
final int index = id.indexOf('-');
if (index > 0) {
return new StreamMessageId(Long.parseLong(id.substring(0, index)), Long.parseLong(id.substring(index + 1)));
}
return new StreamMessageId(Long.parseLong(id));
}
}