|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.channel.ChannelAssignmentService
public class ChannelAssignmentService
Provides a service interface to the shard-to-channel assignment table. This service only works for relational databases and deactivates automatically if the URL is not set. This is necessary to permit proper operation when applying against NoSQL DBMS like MongoDB.
| Constructor Summary | |
|---|---|
ChannelAssignmentService()
|
|
| Method Summary | |
|---|---|
void |
configure(PluginContext context)
Complete plug-in configuration. |
java.lang.Integer |
getChannelAssignment(java.lang.String shardId)
Looks up a channel assignment for a shard. |
java.lang.String |
getName()
Gets the storage name. |
void |
insertChannelAssignment(java.lang.String shardId,
int channel)
Inserts a shard/channel assignment. |
boolean |
isActive()
Returns true if the channel assignment service is active. |
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
listChannelAssignments()
Return a list of current channel assignments. |
void |
prepare(PluginContext context)
Prepare plug-in for use. |
void |
release(PluginContext context)
Release all resources used by plug-in. |
void |
setChannels(int channels)
|
void |
setName(java.lang.String name)
Sets the storage name. |
void |
setPassword(java.lang.String password)
|
void |
setUrl(java.lang.String url)
|
void |
setUser(java.lang.String user)
|
TungstenProperties |
status()
Returns status information as a set of named properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChannelAssignmentService()
| Method Detail |
|---|
public java.lang.String getName()
PipelineService
getName in interface PipelineServicepublic void setName(java.lang.String name)
PipelineService
setName in interface PipelineServicepublic void setUser(java.lang.String user)
public void setUrl(java.lang.String url)
public void setPassword(java.lang.String password)
public void setChannels(int channels)
public boolean isActive()
public void configure(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
configure in interface ReplicatorPluginReplicatorException - Thrown if configuration is incomplete or
fails
java.lang.InterruptedExceptionReplicatorPlugin.configure(com.continuent.tungsten.replicator.plugin.PluginContext)
public void prepare(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
prepare in interface ReplicatorPluginReplicatorException - Thrown if resource allocation fails
java.lang.InterruptedExceptionReplicatorPlugin.prepare(com.continuent.tungsten.replicator.plugin.PluginContext)
public void release(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
release in interface ReplicatorPluginReplicatorException - Thrown if resource deallocation fails
java.lang.InterruptedExceptionReplicatorPlugin.release(com.continuent.tungsten.replicator.plugin.PluginContext)
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> listChannelAssignments()
throws ReplicatorException
ReplicatorException
public void insertChannelAssignment(java.lang.String shardId,
int channel)
throws ReplicatorException
shardId - Shard namechannel - Channel number
ReplicatorException - Thrown if there is an error accessing
database
public java.lang.Integer getChannelAssignment(java.lang.String shardId)
throws ReplicatorException
shardId - Shard name
ReplicatorException - Thrown if there is an error accessing
databasepublic TungstenProperties status()
status in interface PipelineServicePipelineService.status()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||