com.continuent.tungsten.replicator.shard
Interface ShardManagerMBean

All Known Implementing Classes:
ShardManager

public interface ShardManagerMBean

Defines API for shard management extensions.

Version:
1.0
Author:
Stephane Giron

Method Summary
 DynamicMBeanHelper createHelper()
          Returns a helper that supplies MBean metadata.
 int delete(java.util.List<java.util.Map<java.lang.String,java.lang.String>> params)
          Deletes a list of shards based on shard ids (aka shard name).
 int deleteAll()
          Deletes all shards from the shard table.
 int insert(java.util.List<java.util.Map<java.lang.String,java.lang.String>> params)
          Inserts a list of shards into the shard table.
 boolean isAlive()
          Returns true so that clients can confirm connection liveness.
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> list()
          List all shards definitions
 int update(java.util.List<java.util.Map<java.lang.String,java.lang.String>> params)
          Updates a list of shards into the shard table.
 

Method Detail

isAlive

boolean isAlive()
Returns true so that clients can confirm connection liveness.

Returns:
true if the service is up and running, false otherwise

insert

int insert(java.util.List<java.util.Map<java.lang.String,java.lang.String>> params)
           throws java.sql.SQLException
Inserts a list of shards into the shard table. Each shard will be a map of name-value parameters, for example, name -> my_shard, channel -> 2.

Parameters:
params - a list of shards to be inserted
Throws:
java.sql.SQLException

update

int update(java.util.List<java.util.Map<java.lang.String,java.lang.String>> params)
           throws java.sql.SQLException
Updates a list of shards into the shard table. Each shard will be a map of name-value parameters, for example, name -> my_shard, channel -> 2, the key to be used to update being the shard name.

Parameters:
params - a list of shards to be updated
Throws:
java.sql.SQLException

delete

int delete(java.util.List<java.util.Map<java.lang.String,java.lang.String>> params)
           throws java.sql.SQLException
Deletes a list of shards based on shard ids (aka shard name). The list will only contain shard ids.

Parameters:
params -
Throws:
java.sql.SQLException

deleteAll

int deleteAll()
              throws java.sql.SQLException
Deletes all shards from the shard table.

Throws:
java.sql.SQLException

list

java.util.List<java.util.Map<java.lang.String,java.lang.String>> list()
                                                                      throws java.sql.SQLException
List all shards definitions

Returns:
A list of shards represented by maps of name-value.
Throws:
java.sql.SQLException

createHelper

DynamicMBeanHelper createHelper()
                                throws java.lang.Exception
Returns a helper that supplies MBean metadata.

Throws:
java.lang.Exception