|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.channel.ShardChannelTable
public class ShardChannelTable
Encapsulates management of shard to channel assignments. Such assignments are used to manage parallel apply with dynamic mapping of new shards to channels.
| Field Summary | |
|---|---|
static java.lang.String |
CHANNEL_COL
|
static java.lang.String |
SHARD_ID_COL
|
static java.lang.String |
TABLE_NAME
|
| Constructor Summary | |
|---|---|
ShardChannelTable(java.lang.String schema,
java.lang.String tableType)
Create and initialize a new shard channel table. |
|
| Method Summary | |
|---|---|
void |
initializeShardTable(Database database,
int channels)
Set up the channel table. |
int |
insert(Database database,
java.lang.String shardName,
int channelNumber)
Insert a shard/channel assignment into the database. |
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
list(Database conn)
Return a list of currently known shard/channel assignments. |
int |
listMaxChannel(Database conn)
Return the maximum assigned channel. |
int |
reduceAssignments(Database conn,
int channels)
Drop all channel definitions, but only if there are no channel assignments over the currently configured level. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TABLE_NAME
public static final java.lang.String SHARD_ID_COL
public static final java.lang.String CHANNEL_COL
| Constructor Detail |
|---|
public ShardChannelTable(java.lang.String schema,
java.lang.String tableType)
schema - | Method Detail |
|---|
public void initializeShardTable(Database database,
int channels)
throws java.sql.SQLException,
ReplicatorException
ReplicatorException - Thrown if table appears to have invalid data
java.sql.SQLException
public int insert(Database database,
java.lang.String shardName,
int channelNumber)
throws java.sql.SQLException
java.sql.SQLException
public int reduceAssignments(Database conn,
int channels)
throws java.sql.SQLException
java.sql.SQLException
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> list(Database conn)
throws java.sql.SQLException
java.sql.SQLException
public int listMaxChannel(Database conn)
throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||