public static final class IP2LocationConfig.Builder extends Object
IP2LocationConfig instances.
Provides a fluent API for constructing configuration objects.
| Constructor and Description |
|---|
Builder()
Creates a new Builder with default values.
|
| Modifier and Type | Method and Description |
|---|---|
IP2LocationConfig |
build()
Builds the configuration.
|
IP2LocationConfig.Builder |
database(Database database)
Sets the database type.
|
IP2LocationConfig.Builder |
databasePath(String path)
Sets the database path.
|
IP2LocationConfig.Builder |
enabled(boolean enabled)
Sets whether the service is enabled.
|
IP2LocationConfig.Builder |
includeIPv6(boolean includeIPv6)
Sets whether IPv6 support is enabled.
|
IP2LocationConfig.Builder |
initFailureThreshold(int threshold)
Sets the init failure threshold.
|
IP2LocationConfig.Builder |
lookupErrorThreshold(int threshold)
Sets the lookup error threshold.
|
IP2LocationConfig.Builder |
maxAutoRecoveryAttempts(int attempts)
Sets the max auto-recovery attempts.
|
IP2LocationConfig.Builder |
notifyOnTransientErrors(boolean notify)
Sets whether to notify on transient errors.
|
IP2LocationConfig.Builder |
recoverOnCorruption(boolean recover)
Sets whether to recover on corruption.
|
IP2LocationConfig.Builder |
recoverOnDownloadFailure(boolean recover)
Sets whether to recover on download failure.
|
IP2LocationConfig.Builder |
recoveryAction(RecoveryConfig.RecoveryAction action)
Sets the recovery action.
|
IP2LocationConfig.Builder |
recoveryCooldownMinutes(int minutes)
Sets the recovery cooldown in minutes.
|
IP2LocationConfig.Builder |
token(String token)
Sets the download token.
|
IP2LocationConfig.Builder |
useMemoryMappedFile(boolean useMemoryMapped)
Sets whether to use memory-mapped file access.
|
public IP2LocationConfig.Builder enabled(boolean enabled)
enabled - true to enable the servicepublic IP2LocationConfig.Builder token(String token)
token - The IP2Location API tokenpublic IP2LocationConfig.Builder databasePath(String path)
path - Path relative to server installationpublic IP2LocationConfig.Builder database(Database database)
database - The database type to usepublic IP2LocationConfig.Builder includeIPv6(boolean includeIPv6)
includeIPv6 - true to download IPv6 databasepublic IP2LocationConfig.Builder useMemoryMappedFile(boolean useMemoryMapped)
useMemoryMapped - true for memory-mapped accesspublic IP2LocationConfig.Builder recoveryAction(RecoveryConfig.RecoveryAction action)
action - The recovery actionpublic IP2LocationConfig.Builder initFailureThreshold(int threshold)
threshold - Number of failures before recoverypublic IP2LocationConfig.Builder lookupErrorThreshold(int threshold)
threshold - Number of errors before recoverypublic IP2LocationConfig.Builder maxAutoRecoveryAttempts(int attempts)
attempts - Maximum attemptspublic IP2LocationConfig.Builder recoveryCooldownMinutes(int minutes)
minutes - Cooldown periodpublic IP2LocationConfig.Builder recoverOnDownloadFailure(boolean recover)
recover - true to enablepublic IP2LocationConfig.Builder recoverOnCorruption(boolean recover)
recover - true to enablepublic IP2LocationConfig.Builder notifyOnTransientErrors(boolean notify)
notify - true to enablepublic IP2LocationConfig build()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.