dd.host.api
Class HostAppFilter

java.lang.Object
  |
  +--dd.host.api.HostAppFilter
All Implemented Interfaces:
Cloneable, Comparable, QuickSerializable

public class HostAppFilter
extends Object
implements QuickSerializable, Comparable, Cloneable

HostAppFilter is a summary of the registers applications that a host is exporting to the rest of the system.

The String representation of each application is added to a filter to represent a summary of all applications that the a host is exporting. The filter is exported to other nodes in the system through the use of host_heartbeats

Version:
$Id: HostAppFilter.java,v 1.3 2004/05/01 05:44:08 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
HostInfo, HostHbStage, RegisterHostAppReq, RegisterHostAppResp

Constructor Summary
HostAppFilter()
          Constructor: Creates a new HostAppFilter.
HostAppFilter(InputBuffer buffer)
          Constructor: Creates a new HostAppFilter.
HostAppFilter(Set names)
          Constructor: Creates a new HostAppFilter.
HostAppFilter(String name)
          Constructor: Creates a new HostAppFilter.
 
Method Summary
 void add(Set names)
          add an application to the filter.
 void add(String name)
          add an application to the filter.
 Object clone()
          Specified by java.lang.Object
 int compareTo(Object other)
          Specified by java.lang.Comparable
 boolean contains(HostAppFilter filter)
          contains checks if application is exported by host.
 boolean contains(String name)
          contains checks if application is exported by host.
 boolean equals(Object other)
          Specified by java.lang.Object
 int hashCode()
          Specified by java.lang.Object
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 String toString()
          Specified by java.lang.Object
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HostAppFilter

public HostAppFilter()
Constructor: Creates a new HostAppFilter.


HostAppFilter

public HostAppFilter(String name)
Constructor: Creates a new HostAppFilter.


HostAppFilter

public HostAppFilter(Set names)
Constructor: Creates a new HostAppFilter.


HostAppFilter

public HostAppFilter(InputBuffer buffer)
              throws QSException
Constructor: Creates a new HostAppFilter.

Method Detail

contains

public boolean contains(String name)
contains checks if application is exported by host. Returns false if application is definitely not supported by host; otherwise true, application is possibly supported by host.

Parameters:
name - String representation of application.
Returns:
false if application is definitely not supported by host; otherwise true, application is possibly supported by host.

contains

public boolean contains(HostAppFilter filter)
contains checks if application is exported by host. Returns false if application is definitely not supported by host; otherwise true, application is possibly supported by host.

Parameters:
filter - HostAppFilter representation of application.
Returns:
false if application is definitely not supported by host; otherwise true, application is possibly supported by host.

add

public void add(String name)
add an application to the filter.

Parameters:
name - application to add to filter.

add

public void add(Set names)
add an application to the filter.

Parameters:
names - application to add to filter.

serialize

public void serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable

Specified by:
serialize in interface QuickSerializable

hashCode

public int hashCode()
Specified by java.lang.Object

Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Specified by java.lang.Object

Overrides:
equals in class Object

compareTo

public int compareTo(Object other)
Specified by java.lang.Comparable

Specified by:
compareTo in interface Comparable

clone

public Object clone()
             throws CloneNotSupportedException
Specified by java.lang.Object

Overrides:
clone in class Object
CloneNotSupportedException

toString

public String toString()
Specified by java.lang.Object

Overrides:
toString in class Object