public static enum TopicProperties.PersistencePolicy extends Enum<TopicProperties.PersistencePolicy>
Enum Constant and Description |
---|
FULL
Full persistence.
|
SERVER
Server level persistence.
|
SERVICE
Service level persistence.
|
SESSION
Session level persistence.
|
Modifier and Type | Method and Description |
---|---|
static TopicProperties.PersistencePolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TopicProperties.PersistencePolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TopicProperties.PersistencePolicy SERVICE
Topics created and published by the service will be removed from the Diffusion server whenever the service is paused and will be recreated when published to again after resuming.
Such topics will also be removed when the framework connection with Diffusion is lost (causing a pause) or when the application closes.
If the service is paused while topics are being published, such topics will not be removed, as pause attempts to only remove topics which have already been published by the service.
If the total number of created topics exceeds the maximum cache size, configured with the 'gateway.cache.max.size' system property (default value: 1000), the service will only remove the topics stored in the local cache.
public static final TopicProperties.PersistencePolicy SESSION
Topics created by the service will be removed from the Diffusion server when the framework connection to Diffusion is lost or when the application closes.
public static final TopicProperties.PersistencePolicy SERVER
Topics created by the service persist regardless of disconnections and after the application closes, as long as the Diffusion server is running.
public static final TopicProperties.PersistencePolicy FULL
Topics created by the service will persist indefinitely even beyond the life of the Diffusion server instance.
Such topics would be restored when the Diffusion server restarts and
can only be removed by some other mechanism (such as using the Publisher.remove
method or using the Diffusion
Console or client APIs.
This policy will only work if the Diffusion server is configured to
support persistence, otherwise it is the same as SERVER
.
public static TopicProperties.PersistencePolicy[] values()
for (TopicProperties.PersistencePolicy c : TopicProperties.PersistencePolicy.values()) System.out.println(c);
public static TopicProperties.PersistencePolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2024 DiffusionData Limited. All rights reserved.