com.sun.sgs.impl.service.nodemap.affinity
Interface AffinityGroup

All Known Implementing Classes:
AffinitySet, RelocatingAffinityGroup

public interface AffinityGroup

An affinity group in the system. Affinity groups are sets of identities that have formed a community.

Affinity groups have an identifier and a generation number. Affinity groups with different generation numbers cannot be compared. In particular, two groups which have the same affinity group identifier but different generation numbers cannot be assumed to be related in any way.


Method Summary
 long getGeneration()
          Returns a generation number for this affinity group.
 long getId()
          Returns the affinity group identifier.
 Set<Identity> getIdentities()
          Returns the set of Identities which are members of this group.
 

Method Detail

getId

long getId()
Returns the affinity group identifier.

Returns:
the affinity group identifier

getIdentities

Set<Identity> getIdentities()
Returns the set of Identities which are members of this group. The set will contain at least one member.

Returns:
the set of Identities which are members of this group

getGeneration

long getGeneration()
Returns a generation number for this affinity group. Affinity groups in the same generation were created at approximately the same time, so they can be used as the set of communities found at that time. Affinity groups with the same identifier but different generations cannot be compared; they are independent.

Returns:
the generation number for this affinity group

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved