Class TRNonBlockingServer
java.lang.Object
com.biglybt.core.tracker.server.impl.TRTrackerServerImpl
com.biglybt.core.tracker.server.impl.tcp.TRTrackerServerTCP
com.biglybt.core.tracker.server.impl.tcp.nonblocking.TRNonBlockingServer
- All Implemented Interfaces:
VirtualServerChannelSelector.SelectListener
,TRTrackerServer
public class TRNonBlockingServer
extends TRTrackerServerTCP
implements VirtualServerChannelSelector.SelectListener
-
Nested Class Summary
Nested classes/interfaces inherited from class com.biglybt.core.tracker.server.impl.tcp.TRTrackerServerTCP
TRTrackerServerTCP.DOSEntry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate VirtualServerChannelSelector
private static final int
private boolean
private List
private InetAddress
private boolean
private static final LogIDs
static final int
private List
private final VirtualChannelSelector
private static int
private final AEMonitor
private static final int
private long
private long
private final VirtualChannelSelector
Fields inherited from class com.biglybt.core.tracker.server.impl.tcp.TRTrackerServerTCP
class_mon, dos_log_file, PROCESSING_GET_LIMIT, PROCESSING_POST_MULTIPLIER
Fields inherited from class com.biglybt.core.tracker.server.impl.TRTrackerServerImpl
all_networks_permitted, announce_cache_period, announce_cache_threshold, banned_clients, CLIENT_TIMEOUT_MULTIPLIER, full_scrape_enable, listeners, listeners2, max_peers_to_send, max_seed_retention, permitted_networks, redirect_on_not_found, RETRY_MINIMUM_MILLIS, RETRY_MINIMUM_SECS, scrape_cache_period, seed_limit, send_peer_ids, support_experimental_extensions, TIMEOUT_CHECK
Fields inherited from interface com.biglybt.core.tracker.server.TRTrackerServer
DEFAULT_ANNOUNCE_CACHE_PEER_THRESHOLD, DEFAULT_ANNOUNCE_CACHE_PERIOD, DEFAULT_INC_BY, DEFAULT_INC_PER, DEFAULT_MAX_RETRY_DELAY, DEFAULT_MIN_RETRY_DELAY, DEFAULT_NAME, DEFAULT_NAT_CHECK_SECS, DEFAULT_SCRAPE_CACHE_PERIOD, DEFAULT_SCRAPE_RETRY_PERCENTAGE, DEFAULT_TRACKER_PORT, DEFAULT_TRACKER_PORT_SSL
-
Constructor Summary
ConstructorsConstructorDescriptionTRNonBlockingServer
(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, boolean _start_up_ready, Map<String, Object> _properties, TRNonBlockingServerProcessorFactory _processor_factory) TRNonBlockingServer
(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, TRNonBlockingServerProcessorFactory _processor_factory) TRNonBlockingServer
(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, Map<String, Object> _properties, TRNonBlockingServerProcessorFactory _processor_factory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkTimeouts
(long now) void
protected void
void
newConnectionAccepted
(ServerSocketChannel server, SocketChannel channel) The given connection has just been accepted.protected void
readyToWrite
(TRNonBlockingServerProcessor processor) protected void
protected void
selectLoop
(VirtualChannelSelector selector) void
setImmediateClose
(boolean immediate) Methods inherited from class com.biglybt.core.tracker.server.impl.tcp.TRTrackerServerTCP
checkDOS, checkDOSRemove, getHost, getPort, getRestrictNonBlocking, handleExternalRequest, isSSL, runProcessor, setPort, setRestrictNonBlocking
Methods inherited from class com.biglybt.core.tracker.server.impl.TRTrackerServerImpl
addAuthenticationListener, addLink, addListener, addListener2, addRequestListener, close, deny, destroySupport, getAllNetworksSupported, getAnnounceCachePeerThreshold, getAnnounceCachePeriod, getAnnounceRetryInterval, getBiasedPeers, getMaxPeersToSend, getMaxSeedRetention, getMinAnnounceRetryInterval, getMinScrapeRetryInterval, getName, getPassword, getPeers, getPermittedNetworks, getScrapeCachePeriod, getScrapeRetryInterval, getSeedAnnounceIntervalMultiplier, getSeedLimit, getSendPeerIds, getStats, getStats, getTorrent, getTorrent, getTorrentCount, getTorrents, getUsername, hasExternalAuthorisation, hasInternalAuthorisation, isCompactEnabled, isEnabled, isFullScrapeEnabled, isIPFiltered, isKeepAliveEnabled, isKeyEnabled, isKnownTorrent, isReady, isTrackerPasswordEnabled, isWebPasswordEnabled, isWebPasswordHTTPSOnly, performExternalAuthorisation, performExternalAuthorisation, permit, permit, postProcess, preProcess, readConfig, readConfigSettings, removeAuthenticationListener, removeLink, removeListener, removeListener2, removeRequestListener, setBiasedPeers, setEnabled, setEnableKeepAlive, setReady, supportsExtensions, timerLoop, updateStats, updateTime
-
Field Details
-
LOGID
-
TIMEOUT_CHECK_INTERVAL
private static final int TIMEOUT_CHECK_INTERVAL- See Also:
-
CLOSE_DELAY
private static final int CLOSE_DELAY- See Also:
-
SELECT_LOOP_TIME
private static int SELECT_LOOP_TIME -
processor_factory
-
read_selector
-
write_selector
-
connections_to_close
-
processors
-
current_bind_ip
-
total_timeouts
private long total_timeouts -
total_connections
private long total_connections -
MAX_CONCURRENT_CONNECTIONS
public static final int MAX_CONCURRENT_CONNECTIONS -
this_mon
-
accept_server
-
immediate_close
private boolean immediate_close -
closed
private volatile boolean closed
-
-
Constructor Details
-
TRNonBlockingServer
public TRNonBlockingServer(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, TRNonBlockingServerProcessorFactory _processor_factory) throws TRTrackerServerException - Throws:
TRTrackerServerException
-
TRNonBlockingServer
public TRNonBlockingServer(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, Map<String, Object> _properties, TRNonBlockingServerProcessorFactory _processor_factory) throws TRTrackerServerException- Throws:
TRTrackerServerException
-
TRNonBlockingServer
public TRNonBlockingServer(String _name, int _port, InetAddress _bind_ip, boolean _apply_ip_filter, boolean _start_up_ready, Map<String, Object> _properties, TRNonBlockingServerProcessorFactory _processor_factory) throws TRTrackerServerException- Throws:
TRTrackerServerException
-
-
Method Details
-
getBindIP
- Specified by:
getBindIP
in interfaceTRTrackerServer
-
setImmediateClose
public void setImmediateClose(boolean immediate) -
selectLoop
-
newConnectionAccepted
Description copied from interface:VirtualServerChannelSelector.SelectListener
The given connection has just been accepted.- Specified by:
newConnectionAccepted
in interfaceVirtualServerChannelSelector.SelectListener
- Parameters:
channel
- new connection
-
readyToWrite
-
removeAndCloseConnection
-
checkTimeouts
public void checkTimeouts(long now) -
closeLoop
public void closeLoop() -
closeSupport
protected void closeSupport()- Specified by:
closeSupport
in classTRTrackerServerImpl
-