com.novell.application.console.snapin
Class BaseDefaultVirtualEnumeration

java.lang.Object
  extended bycom.novell.application.console.snapin.BaseDefaultVirtualEnumeration
All Implemented Interfaces:
CountableObjectEntryEnumeration
Direct Known Subclasses:
DefaultBrowserObjectEntryEnumeration, DefaultIndexedObjectEntryEnumeration, DefaultVirtualObjectEntryEnumeration

public class BaseDefaultVirtualEnumeration
extends java.lang.Object
implements CountableObjectEntryEnumeration

Provides a base implementation upon which all versions of the virtual ObjectEntryEnumeration classes are built.

Contains shared data and methods which all default implementations of ObjectEntryEnumeration use.

See Also:
DefaultBrowserObjectEntryEnumeration, DefaultIndexedObjectEntryEnumeration, DefaultVirtualObjectEntryEnumeration, ObjectEntryEnumeration

Field Summary
protected  java.util.Vector m_enumerationData
          Vector that holds the enumeration elements.
protected  int m_iEnumerationIndex
          Current index into the data.
protected  Shell m_shell
          Reference back to the shell.
 
Fields inherited from interface com.novell.application.console.snapin.CountableObjectEntryEnumeration
APPROXIMATECOUNT, BASECOUNT, EXACTCOUNT, PARTIALCOUNT, UNKNOWNCOUNT
 
Constructor Summary
BaseDefaultVirtualEnumeration(ObjectEntryEnumeration oee, Shell shell)
          Constructs a BaseDefaultVirtualEnumeration object.
 
Method Summary
 int getCount()
          Returns the total enumeration entry count in the enumeration.
 int getCountReliability()
          Returns an integer which is a representation of the reliability of the count of objects in this enumeration.
 void refresh()
          Indicates that the enumeration needs to flush any cached data.
 void setBlockSize(int size)
          Sets the block size at which the consumer of the enumeration will request entries from the enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_enumerationData

protected java.util.Vector m_enumerationData
Vector that holds the enumeration elements.


m_iEnumerationIndex

protected int m_iEnumerationIndex
Current index into the data.


m_shell

protected Shell m_shell
Reference back to the shell.

Constructor Detail

BaseDefaultVirtualEnumeration

public BaseDefaultVirtualEnumeration(ObjectEntryEnumeration oee,
                                     Shell shell)
Constructs a BaseDefaultVirtualEnumeration object.

Parameters:
oee - The ObjectEntryEnumeration object used to populate this enumeration.
shell - The instance of the Shell that will be used to get object names.
See Also:
ObjectEntryEnumeration
Method Detail

getCount

public int getCount()
Returns the total enumeration entry count in the enumeration.

Specified by:
getCount in interface CountableObjectEntryEnumeration
Returns:
The total enumeration entry count.

getCountReliability

public int getCountReliability()
Returns an integer which is a representation of the reliability of the count of objects in this enumeration. It's normally an exact count since all the results are in memory. However, if the original enumeration was truncated due to reaching the max limit, then BASECOUNT is returned.

Specified by:
getCountReliability in interface CountableObjectEntryEnumeration
Returns:
The integer representation for the reliability of the count. EXACTCOUNT (1) - exact count, we know we have exactly this many objects APPROXIMATECOUNT (2) - approximate count. This is most likely the total number of objects within the container (the subordinate count) It could actually be more than the number of objects in this enumeration because of selective search criteria BASECOUNT (3) - base count. This is the number of objects represented in this enumeration, but because of size/memory restrictions there is actually more objects in the directory that match this search criteria. This is all the objects that can be contained in this enumeration. PARTIALCOUNT (4) - partial count. This is the number of objects represented in this buffer (JCListEnumerator to multiple JClient.listToJCListEnumerator to to DDCListToBuffer calls). There may be more objects if the DDCListToBuffer was called additional times UNKNOWNCOUNT (5) - unknown count. I have no idea.

refresh

public void refresh()
Indicates that the enumeration needs to flush any cached data.

IMPORTANT: Since this implementation of VirtualObjectEntryEnumeration does not use a variable cache, this method is not implemented.


setBlockSize

public void setBlockSize(int size)
Sets the block size at which the consumer of the enumeration will request entries from the enumeration.

IMPORTANT: Since this implementation of VirtualObjectEntryEnumeration does not use a variable cache, this method is not implemented.

Parameters:
size - The block size.


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.