Package com.sun.solaris.service.locality
Class LocalityDomain
- java.lang.Object
-
- com.sun.solaris.service.locality.LocalityDomain
-
public class LocalityDomain extends java.lang.ObjectA representation of the Locality Groups for a single Solaris instance.
-
-
Field Summary
Fields Modifier and Type Field Description static intLGRP_VIEW_CALLERObtain a Locality Group snapshot based on the view available to the caller.static intLGRP_VIEW_OSObtain a Locality Group snapshot based on the view of the Operating System.
-
Constructor Summary
Constructors Constructor Description LocalityDomain(int view)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close this LocalityDomain.protected voidfinalize()Reclaim the resource allocated by the C proxy.java.util.SetforeignGroups(java.util.Set exclude, java.util.List cpus)Return the groups in this domain to which the supplied cpus belong, excluding the supplied set of groups.LocalityGroupgetGroup(int cpuid)Return the LocalityGroup containing the supplied CPU id.java.util.SetgetGroups()Return the set of all LocalityGroups for this LocalityDomain.intgetMaxLatency()Return the maximum possible latency between all locality groups in this domain.LocalityGroupgetRepresentativeGroup(java.util.List cpus)Return the locality group which contains the majority of the cpus in the supplied list.LocalityGroupgetRoot()Return the "root" LocalityGroup.java.lang.StringtoString()Return a string representation of this instance.
-
-
-
Field Detail
-
LGRP_VIEW_CALLER
public static final int LGRP_VIEW_CALLER
Obtain a Locality Group snapshot based on the view available to the caller.- See Also:
- Constant Field Values
-
LGRP_VIEW_OS
public static final int LGRP_VIEW_OS
Obtain a Locality Group snapshot based on the view of the Operating System.- See Also:
- Constant Field Values
-
-
Method Detail
-
finalize
protected void finalize() throws java.lang.ThrowableReclaim the resource allocated by the C proxy.- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable- if there is a problem reclaiming the reosurces.
-
getRoot
public LocalityGroup getRoot()
Return the "root" LocalityGroup.
-
close
public void close()
Close this LocalityDomain. Resources are reclaimed in the C proxy and this LocalityDomain should never be used again. None of the LocalityGroups which are referenced from this LocalityDomain should be used after this method is invoked. NB: jl_fini returns a success indicator which is ignored as we are closing this domain.
-
toString
public java.lang.String toString()
Return a string representation of this instance.- Overrides:
toStringin classjava.lang.Object
-
foreignGroups
public java.util.Set foreignGroups(java.util.Set exclude, java.util.List cpus) throws PoolsExceptionReturn the groups in this domain to which the supplied cpus belong, excluding the supplied set of groups.- Parameters:
exclude- Set of groups to be excluded.cpus- List of cpus- Throws:
PoolsException- if there is an error accessing the cpu details.
-
getRepresentativeGroup
public LocalityGroup getRepresentativeGroup(java.util.List cpus) throws PoolsException
Return the locality group which contains the majority of the cpus in the supplied list. If more than one group satisfies this criteria, then the choice of group is deterministic but unspecified.- Parameters:
cpus- List of cpus to be examined.- Throws:
PoolsException- if there is an error accessing the cpu details.
-
getMaxLatency
public int getMaxLatency()
Return the maximum possible latency between all locality groups in this domain.
-
getGroups
public java.util.Set getGroups()
Return the set of all LocalityGroups for this LocalityDomain.
-
getGroup
public LocalityGroup getGroup(int cpuid)
Return the LocalityGroup containing the supplied CPU id. Search all LocalityGroups starting at the root group.- Parameters:
cpuid- is the sys-id of the CPU to search for.
-
-