Merge branch 'master' of https://github.com/shvid/spring-data-cassandra.git into DATACASS-32
This commit is contained in:
@@ -131,12 +131,7 @@ public class CassandraTemplate implements CassandraOperations {
|
||||
*/
|
||||
for (Host h: hosts) {
|
||||
|
||||
member = new RingMember();
|
||||
member.hostName = h.getAddress().getHostName();
|
||||
member.address = h.getAddress().getHostAddress();
|
||||
member.DC = h.getDatacenter();
|
||||
member.rack = h.getRack();
|
||||
|
||||
member = new RingMember(h);
|
||||
ring.add(member);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,21 +17,31 @@ package org.springframework.data.cassandra.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.datastax.driver.core.Host;
|
||||
|
||||
/**
|
||||
* @author David Webb
|
||||
*
|
||||
*/
|
||||
public class RingMember implements Serializable {
|
||||
public final class RingMember implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1345346346L;
|
||||
|
||||
/*
|
||||
* Ring attributes
|
||||
*/
|
||||
public String hostName;
|
||||
public String address;
|
||||
public String DC;
|
||||
public String rack;
|
||||
public String status;
|
||||
public String state;
|
||||
public final String hostName;
|
||||
public final String address;
|
||||
public final String DC;
|
||||
public final String rack;
|
||||
//public final String status;
|
||||
//public final String state;
|
||||
|
||||
public RingMember(Host h) {
|
||||
this.hostName = h.getAddress().getHostName();
|
||||
this.address = h.getAddress().getHostAddress();
|
||||
this.DC = h.getDatacenter();
|
||||
this.rack = h.getRack();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user