|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.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. @(#) SplitStreamImpl.java
Field Summary | |
---|---|
protected java.util.Hashtable |
channels
Hashtable of all the channels currently created on this node implicitly or explicitly. |
protected int |
defaultMaxChildren
DESCRIBE THE FIELD |
protected java.lang.String |
instance
DESCRIBE THE FIELD |
protected int |
maxFailedSubscriptions
DESCRIBE THE FIELD |
protected Node |
node
The node that this application is running on |
protected Scribe |
scribe
The scribe instance for this SplitStream Object |
protected int |
stripeBaseBitLength
DESCRIBE THE FIELD |
Constructor Summary | |
---|---|
SplitStreamImpl(Node node,
java.lang.String instance)
Convienience 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()
DESCRIBE THE METHOD |
Channel[] |
getChannels()
Returns all of the channels on this local splitstream |
Environment |
getEnvironment()
Gets the Environment attribute of the SplitStreamImpl object |
SplitStreamScribePolicy |
getPolicy()
Returns the policy used to control Scribe |
int |
getStripeBaseBitLength()
Gets the StripeBaseBitLength attribute of the SplitStreamImpl object |
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 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 splitstreamfactory
- DESCRIBE THE PARAMETERMethod Detail |
---|
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 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 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 |