com.neeve.ods
Class StoreInterClusterReplicatorDescriptor

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.ods.OdsObject
          extended by com.neeve.ods.StoreInterClusterReplicatorDescriptor

public final class StoreInterClusterReplicatorDescriptor
extends OdsObject

Describes a store inter-cluster replicator (ICR).

This class contains information used to describe an inter-cluster store replicator (aka the store ICR). It is intended for use by a user when creating store replicators.

Threading:
This class is not thread safe.

Method Summary
static StoreInterClusterReplicatorDescriptor create(String name, IStoreBinding.InterClusterReplicationRole role, String url)
          Create a default ICR descriptor.
 void delete()
          Delete an ICR descriptor from the default configuration repository.
 void delete(IConfigRepository repo)
          Delete an ICR descriptor from the configuration repository.
static boolean exists(IConfigRepository repo, String name)
          Checks if an ICR is configured in a configuration repository
static boolean exists(String name)
          Checks if an ICR is configured in the default configuration repository
 String getName()
          Get the name of the ICR replicator that this descriptor describes.
 Properties getProperties()
          Get the app properties
 String getProperty(String name)
          Get an ICR property.
 IStoreBinding.InterClusterReplicationRole getRole()
          Get the role of the ICR replicator that this descriptor describes.
 String getUrl()
          Get the replication bus descriptor used by this InterClusterReplicator to create the bus connection over which replication is performed.
static StoreInterClusterReplicatorDescriptor load(IConfigRepository repo, String name)
          Create an ICR descriptor from a configuration respository.
static StoreInterClusterReplicatorDescriptor load(String name)
          Create an ICR descriptor from the default configuration respository.
static Set<StoreInterClusterReplicatorDescriptor> loadAll()
          Create ICR descriptors for all ICRs configured in the default configuration repository.
static Set<StoreInterClusterReplicatorDescriptor> loadAll(IConfigRepository repo)
          Create ICR descriptors for all ICRs in a configuration repository.
 void save()
          Save an ICR descriptor to the default configuration repository.
 void save(IConfigRepository repo)
          Save an ICR descriptor to a configuration repository.
 Properties save(Properties props)
          Save an ICR descriptor to a property table.
 StoreInterClusterReplicatorDescriptor setProperties(Properties props)
          Set a set of ICR properties.
 StoreInterClusterReplicatorDescriptor setProperty(String name, String val)
          Set an ICR property.
 String toString()
          Returns a string representation of this object
 
Methods inherited from class com.neeve.root.RootObject
getChecked, getThreaded, getTracer, setChecked, setTracer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public final String getName()
Get the name of the ICR replicator that this descriptor describes.


getRole

public final IStoreBinding.InterClusterReplicationRole getRole()
Get the role of the ICR replicator that this descriptor describes.


getUrl

public final String getUrl()
Get the replication bus descriptor used by this InterClusterReplicator to create the bus connection over which replication is performed.


setProperty

public final StoreInterClusterReplicatorDescriptor setProperty(String name,
                                                               String val)
Set an ICR property.

Returns:
Returns this object for invocation chaining.
Threading:
This method is safe for concurrent access by multiple threads.

getProperty

public final String getProperty(String name)
Get an ICR property.

Threading:
This method is safe for concurrent access by multiple threads.

setProperties

public final StoreInterClusterReplicatorDescriptor setProperties(Properties props)
Set a set of ICR properties.

Returns:
Returns this object for invocation chaining.
Threading:
This method is safe for concurrent access by multiple threads.

getProperties

public final Properties getProperties()
Get the app properties

Threading:
This method is safe for concurrent access by multiple threads.

save

public final Properties save(Properties props)
Save an ICR descriptor to a property table.

Parameters:
props - The property table.
Throws:
IllegalArgumentException - If the properties are null
Threading:
This method is notsafe for concurrent access by multiple threads.

save

public final void save(IConfigRepository repo)
                throws OdsException
Save an ICR descriptor to a configuration repository.

Parameters:
repo - The root directory of the configuration respository.
Throws:
OdsException - Thrown in case an error in encountered during the saving of the descriptor.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method saves an ICR descriptor to a configuration repository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered by this class.


save

public final void save()
                throws OdsException
Save an ICR descriptor to the default configuration repository.

Throws:
OdsException
Threading:
This method is notsafe for concurrent access by multiple threads.

This method saves an ICR descriptor to the default confiiguration respository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered in this class.


delete

public final void delete(IConfigRepository repo)
                  throws OdsException
Delete an ICR descriptor from the configuration repository.

Parameters:
repo - The configuration respository to delete the descriptor from.
Throws:
OdsException - Thrown in case an error in encountered during the deletion of the descriptor.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method deletes an ICR descriptor from a configuration repository.


delete

public final void delete()
                  throws OdsException
Delete an ICR descriptor from the default configuration repository.

Throws:
OdsException - Thrown in case an error in encountered during the deletion of the descriptor.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method permanently deletes an ICR descriptor from the default configuration repository.


create

public static StoreInterClusterReplicatorDescriptor create(String name,
                                                           IStoreBinding.InterClusterReplicationRole role,
                                                           String url)
Create a default ICR descriptor.

Parameters:
name - The name of the ICR whose descriptor is to be prepared.
role - The ICR's role
url - The url to be used by the ICR for replication.
Threading:
This method is safe for concurrent access by multiple threads.

exists

public static boolean exists(IConfigRepository repo,
                             String name)
Checks if an ICR is configured in a configuration repository

Parameters:
repo - The configuration respository to check in.
name - The name of the ICR to check for.
Threading:
This method is safe for concurrent access by multiple threads.

exists

public static boolean exists(String name)
Checks if an ICR is configured in the default configuration repository

Parameters:
name - The name of the ICR to check for.
Threading:
This method is safe for concurrent access by multiple threads.

load

public static StoreInterClusterReplicatorDescriptor load(IConfigRepository repo,
                                                         String name)
                                                  throws OdsException
Create an ICR descriptor from a configuration respository.

Parameters:
repo - The configuration repository from where to load the descriptor.
name - The name of the ICR whose descriptor is to be prepared.
Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.

load

public static StoreInterClusterReplicatorDescriptor load(String name)
                                                  throws OdsException
Create an ICR descriptor from the default configuration respository.

Parameters:
name - The name of the ICR whose descriptor is to be prepared.
Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.

loadAll

public static Set<StoreInterClusterReplicatorDescriptor> loadAll(IConfigRepository repo)
                                                          throws OdsException
Create ICR descriptors for all ICRs in a configuration repository.

Parameters:
repo - The configuration respository from where to create the ICRs.
Returns:
Returns the set of ICR descriptors.

This method creates and initializes ICR descriptors for each of the ICRs configured in a configuration repository.

Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.

loadAll

public static Set<StoreInterClusterReplicatorDescriptor> loadAll()
                                                          throws OdsException
Create ICR descriptors for all ICRs configured in the default configuration repository.

Returns:
Returns the set of ICR descriptors.

This method creates and initializes ICRs descriptors for all the ICRs configured in the default configuration repository.

Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.

toString

public final String toString()
Returns a string representation of this object

Overrides:
toString in class Object


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.