yacy_search_server/source/net/yacy/server/http/AlternativeDomainNames.java
Michael Peter Christen 6491270b3a large IPv6 redesign of peer ping methods!
removed preferred IPv4 in start options and added a new field IP6 in
peer seeds which will contain one or more IPv6 addresses. Now every peer
has one or more IP addresses assigned, even several IPv6 addresses are
possible. The peer-ping process must check all given and possible IP
addresses for a backping and return the one IP which was successful when
pinging the peer. The ping-ing peer must be able to recognize which of
the given IPs are available for outside access of the peer and store
this accordingly. If only one IPv6 address is available and no IPv4,
then the IPv6 is stored in the old IP field of the seed DNA.
Many methods in Seed.java are now marked as @deprecated because they had
been used for a single IP only. There is still a large construction site
left in YaCy now where all these deprecated methods must be replaced
with new method calls. The 'extra'-IPs, used by cluster assignment had
been removed since that can be replaced with IPv6 usage in p2p clusters.
All clusters must now use IPv6 if they want an intranet-routing.
2014-09-30 14:53:52 +02:00

71 lines
2.1 KiB
Java

/**
* AlternativeDomainNames
* (C) 2008 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany
* first published 05.05.2008 on http://yacy.net
*
* $LastChangedDate$
* $LastChangedRevision$
* $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program in the file lgpl21.txt
* If not, see <http://www.gnu.org/licenses/>.
*/
package net.yacy.server.http;
import java.util.Set;
public interface AlternativeDomainNames {
/**
* for a given domain name, return a new address
* the new address may also be a combination of a standard domain name or an IP with ':' and a port number
* @param name: a domain name
* @return an alternative name
*/
public String resolve(String name);
/**
* while other servers may have alternative addresses, this server may also have an alternative
* address
* @return the alternative address of this server which other servers may can resolve
*/
public String myAlternativeAddress();
/**
* return a set of IPs of this server
* @return IP as set of strings of this server
*/
public Set<String> myIPs();
/**
* return the port of my server address
* @return port number of this server
*/
public int myPort();
/**
* return a name of this server. this may be any string and there is no need that it must be unique
* @return
*/
public String myName();
/**
* return an unique ID of this server
* @return
*/
public String myID();
}