/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* ident "%Z%%M% %I% %E% SMI"
*
*/
/**
* A representation of an individual Locality Group. A Locality Group
* resides within a Locality Domain.
*/
public class LocalityGroup
{
/**
* The locality domain which contains this group.
*/
/**
* The C proxy id for this instance.
*/
private long id;
/**
* The parent group of this instance.
*/
/**
* The array of CPU IDs which are assigned to this instance.
*/
private int cpu_ids[];
/**
* The child groups of this instance.
*/
/**
* Constructor.
*
* @param domain is the domain to which this instance belongs.
* @param id is the id of this instance.
* @param parent is the parent of this instance.
*/
{
long nativeChildren[] = jl_children();
nativeChildren[i], this));
}
/**
* Return a string representation of this instance.
*/
{
.append(" with cpus [");
sep = " ";
}
}
/**
* Return the set of child locality groups for this instance.
*/
{
return (children);
}
/**
* Return the array of CPU IDs which belong to this locality
* group.
*/
public int[] getCPUIDs()
{
return (cpu_ids);
}
/**
* Return the locality group ID.
*/
long getID()
{
return (id);
}
/**
* Return the latency of the supplied group with respect to
* this group.
*
* @param other is another locality group belonging to the
* same LocalityDomain.
*/
{
}
/**
* Return the number of Latency Groups to which these cpus
* belong which are not part of this group.
*
* @param cpus List of cpus to be examined.
*
* @throws PoolsException if there is an error accessing the
* cpu details.
*/
{
if (other != this &&
}
}
}
}
{
"cpu.sys_id")) {
break;
}
}
}
return (contained);
}
/**
* Return an array containing the child locality group IDs.
*/
private native long[] jl_children();
/**
* Return an array of CPU IDs within this locality group.
*/
private native int[] jl_cpus();
/**
* Return the latency between the two supplied lgrp IDs.
*
* @param id1 is the first id.
* @param id2 is the second id.
*/
}