|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.splitstream.SplitStreamImpl
public class SplitStreamImpl
This is the implementing class of the ISplitStream interface. It provides the functionality of creating and attaching to channels. This class is responsible for handling all channels that a local node is part of.
Field Summary | |
---|---|
protected java.util.Hashtable<ChannelId,Channel> |
channels
Hashtable of all the channels currently created on this node implicitly or explicitly. |
protected int |
defaultMaxChildren
|
protected java.lang.String |
instance
|
protected int |
maxFailedSubscriptions
|
protected Node |
node
The node that this application is running on |
protected Scribe |
scribe
The scribe instance for this SplitStream Object |
protected int |
stripeBaseBitLength
|
Constructor Summary | |
---|---|
SplitStreamImpl(Node node,
java.lang.String instance)
Convenience constructor which uses the default SplitStreamScribePolicy. |
|
SplitStreamImpl(Node node,
java.lang.String instance,
SplitStreamScribePolicyFactory factory)
The constructor for building the splitStream object which internally creates it's own Scribe. |
Method Summary | |
---|---|
Channel |
attachChannel(ChannelId id)
This method is used by peers who wish to listen to content distributed by some other peer using SplitStream. |
Channel |
createChannel(ChannelId id)
This method is used by a peer who wishes to distribute the content using SplitStream. |
void |
destroy()
|
Channel[] |
getChannels()
Returns all of the channels on this local splitstream |
Environment |
getEnvironment()
|
SplitStreamScribePolicy |
getPolicy()
Returns the policy used to control Scribe |
int |
getStripeBaseBitLength()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Scribe scribe
protected Node node
protected java.util.Hashtable<ChannelId,Channel> channels
protected final int stripeBaseBitLength
protected final int maxFailedSubscriptions
protected final int defaultMaxChildren
protected java.lang.String instance
Constructor Detail |
---|
public SplitStreamImpl(Node node, java.lang.String instance)
node
- instance
- public SplitStreamImpl(Node node, java.lang.String instance, SplitStreamScribePolicyFactory factory)
node
- the pastry node that we will useinstance
- The instance name for this splitstreamMethod Detail |
---|
public Channel createChannel(ChannelId id)
createChannel
in interface SplitStream
id
- The id of the channel to create
public Channel attachChannel(ChannelId id)
attachChannel
in interface SplitStream
id
- The id of the channel to create
public Channel[] getChannels()
getChannels
in interface SplitStream
public SplitStreamScribePolicy getPolicy()
public int getStripeBaseBitLength()
getStripeBaseBitLength
in interface SplitStream
public Environment getEnvironment()
getEnvironment
in interface SplitStream
public void destroy()
destroy
in interface Destructable
destroy
in interface SplitStream
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |