VisiBroker for Java

com.inprise.vbroker.CosNamingExt
Interface ClusterOperations

All Known Subinterfaces:
Cluster

public interface ClusterOperations

Allows a number of object bindings to be associated with a single name. The VisiBroker Naming Service supports this feature. Please see the Developers' Guide for details. A Cluster is very similar to a Context. There are certain operations found in a Context that are not relevant to a Cluster. For example, it doesnt make sense binding a context to a Cluster. A Cluster is supposed to contain a set of object references, not contexts. However, a Cluster interface shares many of the same operations with the Context interface, such as bind, rebind, resolve, unbind and list operations. This common set of operations pertains to operations on a group. The only cluster specific operation is select(). Another crucial difference between the two is that a Cluster does not support compound name. It only uses a single component name. This is because there is no directory structure in a Cluster. A Cluster stores its object references in a flat structure.


Method Summary
 void bind(NameComponent n, Object obj)
          Binds an object into a cluster.
 void destroy()
          Destroys the cluster object.
 void list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
          Iterates through the cluster and returns the bindings.
 void markSuspect(NameComponent n)
           
 void rebind(NameComponent n, Object obj)
          Binds an object into the cluster even if the name was perviously bound.
 Object resolve(NameComponent n)
          Returns the named object that was previously bound to the cluster.
 Object select()
          Selects and returns one of the objects that were previously bound to the cluster based on the pre-selected criterion at cluster creation time.
 void unbind(NameComponent n)
          Unbinds a previous binding.
 

Method Detail

markSuspect

void markSuspect(NameComponent n)

list

void list(int how_many,
          BindingListHolder bl,
          BindingIteratorHolder bi)
Iterates through the cluster and returns the bindings. The parameters for this method are identical to those of the list method in org.omg.CosNaming.NamingContext.


destroy

void destroy()
             throws NotEmpty
Destroys the cluster object.

Throws:
NotEmpty

unbind

void unbind(NameComponent n)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Unbinds a previous binding.

Parameters:
n - the Name of the object to be unbound from the cluster.
Throws:
NotFound
CannotProceed
InvalidName

resolve

Object resolve(NameComponent n)
               throws NotFound,
                      CannotProceed,
                      InvalidName
Returns the named object that was previously bound to the cluster.

Parameters:
n - the Name of the object
Throws:
NotFound
CannotProceed
InvalidName

rebind

void rebind(NameComponent n,
            Object obj)
            throws CannotProceed,
                   InvalidName
Binds an object into the cluster even if the name was perviously bound.

Parameters:
n - the Name which with the object is to be bound.
obj - the object to be bound into the cluster.
Throws:
CannotProceed
InvalidName

bind

void bind(NameComponent n,
          Object obj)
          throws CannotProceed,
                 InvalidName,
                 AlreadyBound
Binds an object into a cluster.

Parameters:
n - the Name which with the object is to be bound.
obj - the object to be bound into the cluster.
Throws:
CannotProceed
InvalidName
AlreadyBound

select

Object select()
              throws Empty
Selects and returns one of the objects that were previously bound to the cluster based on the pre-selected criterion at cluster creation time.

Throws:
Empty

Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online