| 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrice.p2p.splitstream.Channel
The channel controls all the meta data associated with a group of stripes. It contains the stripes themselves, and one of the stripe is the primary stripe for this channel. A stripe whose topicId matches some prefix with local node id, then it becomes its primary stripe. A channelId uniquely identifies a channel. Number of stripes is obtained by pow(2, STRIPE_BASE), so for STRIPE_BASE = 4, it is 16. Stripe identifiers are obtained by replacing first digit by every possible value of a digit and second digit by 8. So, if channelId is <0x1AB88..>, then stripe id's generated are <0x08B88..>, <0x18B88..>, <0x28B88..> etc.
| Field Summary | |
protected  ChannelId | 
channelId
ChannelId for this channel  | 
protected  Id | 
localId
The Id of the local node  | 
static int | 
STRIPE_BASE
The default number of stripes to create  | 
protected  Stripe[] | 
stripes
The list of stripeIds for this channel  | 
| Constructor Summary | |
Channel(ChannelId channelId,
        Scribe scribe,
        IdFactory factory,
        Id localId)
Constructor to create a new channel from scratch  | 
|
| Method Summary | |
protected static StripeId[] | 
generateStripeIds(ChannelId id,
                  IdFactory factory)
Creates and returns the Ids associated with the provided channelId  | 
 ChannelId | 
getChannelId()
Gets the channelId for this channel  | 
 Id | 
getLocalId()
Gets the local node id.  | 
protected  Stripe | 
getPrimaryStripe()
The primary stripe is the stripe that the user must have.  | 
 Stripe[] | 
getStripes()
At any moment a node is subscribed to at least 1 but possibly more stripes.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected ChannelId channelId
protected Stripe[] stripes
protected Id localId
public static int STRIPE_BASE
| Constructor Detail | 
public Channel(ChannelId channelId,
               Scribe scribe,
               IdFactory factory,
               Id localId)
channelId - The Id of the channelscribe - The underlying stripe objectfactory - The Id factorylocalId - The local Id| Method Detail | 
public Id getLocalId()
public ChannelId getChannelId()
public Stripe[] getStripes()
protected Stripe getPrimaryStripe()
protected static StripeId[] generateStripeIds(ChannelId id,
                                              IdFactory factory)
id - DESCRIBE THE PARAMETERfactory - DESCRIBE THE PARAMETER
  | 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||