ServerSelector class
Server selection strategy for S&F operations
Constructors
- ServerSelector({required Host host, Duration? capacityCacheDuration})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → Host
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearCapacityCache(
) → void - Clear capacity cache
- Clear unavailable server marks
-
getStats(
) → Map< String, dynamic> - Get statistics
-
isServerAvailable(
PeerId serverId) → Future< bool> - Check if a server is available
- Mark server as temporarily unavailable
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryServerCapacity(
PeerId serverId) → Future< ServerCapacity?> - Query server capacity (with caching)
-
registerServerAddress(
PeerId serverId, MultiAddr addr) → void - Register a known server address so it can be refreshed in the peerstore when reconnection is needed.
-
selectServer(
List< SFServerPreference> preferences) → Future<PeerId?> - Select best available server from preference list
-
selectServerByCapacity(
List< SFServerPreference> preferences) → Future<PeerId?> - Select server with best capacity
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited