| | |
| | | private List<String> refUrls = new ArrayList<String>(0); |
| | | // Group id |
| | | private byte groupId = (byte) -1; |
| | | // Protocol version |
| | | private short protocolVersion = -1; |
| | | |
| | | private Set<String> eclIncludes = new HashSet<String>(); |
| | | |
| | |
| | | * @param groupId DS group id |
| | | * @param refUrls DS exported referrals URLs |
| | | * @param eclIncludes The list of entry attributes to include in the ECL. |
| | | * @param protocolVersion Protocol version supported by this server. |
| | | */ |
| | | public DSInfo(int dsId, int rsId, long generationId, ServerStatus status, |
| | | boolean assuredFlag, AssuredMode assuredMode, byte safeDataLevel, |
| | | byte groupId, List<String> refUrls, Set<String> eclIncludes) |
| | | byte groupId, List<String> refUrls, Set<String> eclIncludes, |
| | | short protocolVersion) |
| | | { |
| | | |
| | | this.dsId = dsId; |
| | |
| | | this.groupId = groupId; |
| | | this.refUrls = refUrls; |
| | | this.eclIncludes = eclIncludes; |
| | | this.protocolVersion = protocolVersion; |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * Get the entry attributes to be included in the ECL. |
| | | * @return a. |
| | | * @return The entry attributes to be included in the ECL. |
| | | */ |
| | | public Set<String> getEclIncludes() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Get the protocol version supported by this server. |
| | | * Returns -1 when the protocol version is not known (too old version). |
| | | * @return The protocol version. |
| | | */ |
| | | public short getProtocolVersion() |
| | | { |
| | | return protocolVersion; |
| | | } |
| | | |
| | | /** |
| | | * Test if the passed object is equal to this one. |
| | | * @param obj The object to test |
| | | * @return True if both objects are equal |
| | |
| | | (assuredMode == dsInfo.getAssuredMode()) && |
| | | (safeDataLevel == dsInfo.getSafeDataLevel()) && |
| | | (groupId == dsInfo.getGroupId()) && |
| | | (protocolVersion == dsInfo.getProtocolVersion()) && |
| | | (refUrls.equals(dsInfo.getRefUrls())) && |
| | | (((eclIncludes == null) && (dsInfo.getEclIncludes() == null)) || |
| | | ((eclIncludes != null) && |
| | |
| | | hash = 73 * hash + (this.refUrls != null ? this.refUrls.hashCode() : 0); |
| | | hash = 73 * hash + (this.eclIncludes != null ? eclIncludes.hashCode() : 0); |
| | | hash = 73 * hash + this.groupId; |
| | | hash = 73 * hash + this.protocolVersion; |
| | | return hash; |
| | | } |
| | | |
| | |
| | | sb.append(safeDataLevel); |
| | | sb.append(" ; Group id: "); |
| | | sb.append(groupId); |
| | | sb.append(" ; Protocol version: "); |
| | | sb.append(protocolVersion); |
| | | sb.append(" ; Referral URLs: "); |
| | | sb.append(refUrls); |
| | | sb.append(" ; ECL Include: "); |