public class Subscription extends Object
| Constructor and Description |
|---|
Subscription(SubscriptionConfig configuration,
Logger logger)
Create an instance of subscription from configuration
|
| Modifier and Type | Method and Description |
|---|---|
SubscriptionStat |
getStatistics()
Get subscription statistics
|
Exception |
getStoredException()
Retrieves the stored exception from subscription thread
|
SubscriptionStatus |
getSubscriptionStatus()
Get subscription thread status, if thread does not exit,
return subscription not yet started.
|
void |
shutdown()
Shutdown a subscription completely, keep the thread object to keep the
state.
|
void |
start()
Start subscription main thread, subscribe from the very first VLSN
from the feeder.
|
void |
start(VLSN vlsn)
Start subscription main thread, subscribe from a specific VLSN
from the feeder.
|
public Subscription(SubscriptionConfig configuration, Logger logger) throws IllegalArgumentException
configuration - configuration parameterslogger - logging handlerIllegalArgumentException - if env directory does not existpublic void start()
throws IllegalArgumentException,
InsufficientLogException,
GroupShutdownException,
InternalException,
TimeoutException
InsufficientLogException - if feeder is unable to stream from
start VLSNGroupShutdownException - if subscription receives group shutdownInternalException - if internal exceptionTimeoutException - if subscription initialization timeoutIllegalArgumentExceptionpublic void start(VLSN vlsn) throws IllegalArgumentException, InsufficientLogException, GroupShutdownException, InternalException, TimeoutException, ReplicationSecurityException
vlsn - the start VLSN of subscription. It cannot be NULL_VLSN
otherwise an IllegalArgumentException will be raised.InsufficientLogException - if feeder is unable to stream from
start VLSNGroupShutdownException - if subscription receives group shutdownInternalException - if internal exceptionTimeoutException - if subscription initialization timeoutReplicationSecurityException - if security check failsIllegalArgumentExceptionpublic void shutdown()
public Exception getStoredException()
public SubscriptionStatus getSubscriptionStatus()
public SubscriptionStat getStatistics()
Copyright © 2024. All rights reserved.