public abstract static class Replicator.Abstract extends Object implements Replicator
Replicator.Abstract, Replicator.Partner, Replicator.Target| Modifier and Type | Field and Description |
|---|---|
static String |
PARTNER_PROPERTIES
Partner properties.
|
static String |
REPLICATE_CONVERTS_PROPERTY
Replicate converts property.
|
static String |
REPLICATED_DEFAULTS_PROPERTY
Replicated defaults property.
|
static String |
REPLICATED_TRACES
Traces subdirectory for replicated values.
|
static String |
REPLICATOR_PROPERTIES
Replicator group properties.
|
static String |
STORE_NAME_PROPERTY
The store name of a partner.
|
| Constructor and Description |
|---|
Abstract() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes.
|
protected abstract void |
close(Replicator.Partner partner)
Closes the connection with a partner.
|
void |
commit()
Commits the pending replicates.
|
protected abstract void |
commit(Replicator.Partner partner)
Commits.
|
protected PointValue[] |
filter(PointValue pointValue)
Filters a point value.
|
protected Collection<Replicator.Partner> |
getAnonymousPartners()
Gets the anonymous partners.
|
protected Metadata |
getMetadata()
Gets the metadata.
|
Collection<String> |
getPartnerNames()
Gets the partner names.
|
protected Collection<Replicator.Partner> |
getPartners()
Gets the partners.
|
protected Service |
getService()
Gets the service.
|
protected StoreStats |
getStats()
Gets the stats.
|
protected Collection<Replicator.Target> |
getTargets(UUID pointUUID)
Gets the targets for a point.
|
protected Logger |
getThisLogger()
Gets the logger.
|
protected boolean |
isEnabled()
Asks if replication is enabled.
|
protected boolean |
isReplicated(PointValue pointValue)
Asks if a point value is replicated.
|
boolean |
join()
Joins whatever thread set up by this replicator.
|
protected abstract Replicator.Partner |
newPartner(KeyedGroups partnerProperties)
Returns a new partner informations object.
|
protected abstract boolean |
open(Replicator.Partner partner)
Opens a connection with a partner.
|
void |
replicate(PointValue pointValue)
Replicates of a point value.
|
protected abstract void |
replicate(ReplicatedValue pointValue,
Replicator.Partner partner)
Replicates a point value to a partner.
|
boolean |
setUp(StoreServiceAppImpl storeAppImpl)
Sets up for processing.
|
boolean |
setUpImpl()
Sets up the implementation for processing.
|
void |
start()
Starts this replicator.
|
void |
tearDown()
Tears down what has been set up.
|
void |
useNewMetadata()
Uses new metadata.
|
public static final String PARTNER_PROPERTIES
public static final String REPLICATED_DEFAULTS_PROPERTY
public static final String REPLICATED_TRACES
public static final String REPLICATE_CONVERTS_PROPERTY
public static final String REPLICATOR_PROPERTIES
public static final String STORE_NAME_PROPERTY
public final void close()
close in interface Replicatorpublic final void commit()
throws InterruptedException
commit in interface ReplicatorInterruptedException - When the service is stopped.public final Collection<String> getPartnerNames()
getPartnerNames in interface Replicatorpublic boolean join()
join in interface Replicatorpublic final void replicate(PointValue pointValue) throws InterruptedException
replicate in interface ReplicatorpointValue - The point value.InterruptedException - When the Service is stopped.public final boolean setUp(StoreServiceAppImpl storeAppImpl)
setUp in interface ReplicatorstoreAppImpl - The store application implementation.public boolean setUpImpl()
setUpImpl in interface Replicatorpublic void start()
start in interface Replicatorpublic final void tearDown()
tearDown in interface Replicatorpublic final void useNewMetadata()
useNewMetadata in interface Replicatorprotected abstract void close(@Nonnull
Replicator.Partner partner)
partner - The partner.protected abstract void commit(@Nonnull
Replicator.Partner partner)
throws InterruptedException
partner - The partner.InterruptedException - When interrupted.@Nonnull @CheckReturnValue protected final PointValue[] filter(@Nonnull PointValue pointValue)
pointValue - The point value.@Nonnull @CheckReturnValue protected final Collection<Replicator.Partner> getAnonymousPartners()
@Nonnull @CheckReturnValue protected final Metadata getMetadata()
@Nonnull @CheckReturnValue protected final Collection<Replicator.Partner> getPartners()
@Nonnull @CheckReturnValue protected final Service getService()
@Nonnull @CheckReturnValue protected final StoreStats getStats()
@Nonnull @CheckReturnValue protected final Collection<Replicator.Target> getTargets(@Nonnull UUID pointUUID)
pointUUID - The point's UUID.@Nonnull @CheckReturnValue protected final Logger getThisLogger()
@CheckReturnValue protected final boolean isEnabled()
@CheckReturnValue
protected final boolean isReplicated(@Nonnull
PointValue pointValue)
pointValue - The point value.@Nonnull @CheckReturnValue protected abstract Replicator.Partner newPartner(@Nonnull KeyedGroups partnerProperties)
partnerProperties - The partner configuration properties.@CheckReturnValue
protected abstract boolean open(@Nonnull
Replicator.Partner partner)
partner - The partner.protected abstract void replicate(@Nonnull
ReplicatedValue pointValue,
@Nonnull
Replicator.Partner partner)
throws InterruptedException
pointValue - The point value.partner - The partner.InterruptedException - When interrupted.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.