Package net.carcdr.yhocuspocus.redis
Class RedisExtensionConfig
java.lang.Object
net.carcdr.yhocuspocus.redis.RedisExtensionConfig
Configuration for Redis extensions.
Use the builder pattern to create instances:
RedisExtensionConfig config = RedisExtensionConfig.builder()
.prefix("myapp")
.instanceId("instance-1")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for RedisExtensionConfig. -
Method Summary
Modifier and TypeMethodDescriptionawarenessChannel(String documentName) Generates the channel name for awareness updates.static RedisExtensionConfig.Builderbuilder()Creates a new builder for RedisExtensionConfig.static RedisExtensionConfigdefaults()Creates a default configuration.documentChannel(String documentName) Generates the channel name for document updates.Gets the minimum interval between awareness updates.Gets the unique instance ID for this server.Gets the key prefix for Redis keys.booleanChecks if cross-instance awareness sync is enabled.Generates the key for document state storage.Generates the key for document state vector storage.
-
Method Details
-
builder
Creates a new builder for RedisExtensionConfig.- Returns:
- a new builder
-
defaults
Creates a default configuration.- Returns:
- default configuration
-
getPrefix
-
getInstanceId
-
getAwarenessThrottle
Gets the minimum interval between awareness updates.- Returns:
- the throttle duration
-
isAwarenessEnabled
public boolean isAwarenessEnabled()Checks if cross-instance awareness sync is enabled.- Returns:
- true if awareness sync is enabled
-
documentChannel
-
awarenessChannel
-
stateKey
-
vectorKey
-