Java Code Examples for sun.management.snmp.util.SnmpCachedData#find()

The following examples show how to use sun.management.snmp.util.SnmpCachedData#find() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JvmMemGCTableMetaImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 2
Source File: JvmMemGCTableMetaImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 3
Source File: JvmMemGCTableMetaImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 4
Source File: JvmMemGCTableMetaImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 5
Source File: JvmMemGCTableMetaImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 6
Source File: JvmMemGCTableMetaImpl.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 7
Source File: JvmMemGCTableMetaImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 8
Source File: JvmMemGCTableMetaImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 9
Source File: JvmMemGCTableMetaImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 10
Source File: JvmMemGCTableMetaImpl.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 11
Source File: JvmMemGCTableMetaImpl.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}
 
Example 12
Source File: JvmMemGCTableMetaImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the index that immediately follows the given
 * <var>index</var>. The returned index is strictly greater
 * than the given <var>index</var>, and is contained in the table.
 * <br>If the given <var>index</var> is null, returns the first
 * index in the table.
 * <br>If there are no index after the given <var>index</var>,
 * returns null.
 * This method is an optimization for the case where the
 * SnmpTableHandler is in fact an instance of SnmpCachedData.
 **/
public SnmpOid getNext(SnmpCachedData datas, SnmpOid index) {

    final boolean dbg = log.isDebugOn();

    // We're going to loop until we find an instance of
    // GarbageCollectorMXBean. First we attempt to find
    // the next element whose OID follows the given index.
    // If `index' is null, the insertion point is -1
    // (the next is 0 = -insertion - 1)
    //
    final int insertion = (index==null)?-1:datas.find(index);
    if (dbg) log.debug("GCTableFilter","oid="+index+
                       " at insertion="+insertion);

    int next;
    if (insertion > -1) next = insertion+1;
    else next = -insertion -1;

    // Now `next' points to the element that imediately
    // follows the given `index'. We're going to loop
    // through the table, starting at `next' (included),
    // and return the first element which is an instance
    // of GarbageCollectorMXBean.
    //
    for (;next<datas.indexes.length;next++) {
        if (dbg) log.debug("GCTableFilter","next="+next);
        final Object value = datas.datas[next];
        if (dbg) log.debug("GCTableFilter","value["+next+"]=" +
              ((MemoryManagerMXBean)value).getName());
        if (value instanceof GarbageCollectorMXBean) {
            // That's the next: return it.
            if (dbg) log.debug("GCTableFilter",
                  ((MemoryManagerMXBean)value).getName() +
                  " is a  GarbageCollectorMXBean.");
            return datas.indexes[next];
        }
        if (dbg) log.debug("GCTableFilter",
              ((MemoryManagerMXBean)value).getName() +
              " is not a  GarbageCollectorMXBean: " +
              value.getClass().getName());
        // skip to next index...
    }
    return null;
}