use of org.apache.cassandra.streaming.SessionInfo in project scylla-jmx by scylladb.
the class StreamStateCompositeData method fromCompositeData.
public static StreamState fromCompositeData(CompositeData cd) {
assert cd.getCompositeType().equals(COMPOSITE_TYPE);
Object[] values = cd.getAll(ITEM_NAMES);
UUID planId = UUID.fromString((String) values[0]);
String description = (String) values[1];
Set<SessionInfo> sessions = Sets.newHashSet(Iterables.transform(Arrays.asList((CompositeData[]) values[2]), input -> SessionInfoCompositeData.fromCompositeData(input)));
return new StreamState(planId, description, sessions);
}
Aggregations