Serializable
, Comparable<SystemContext>
public enum SystemContext extends Enum<SystemContext>
Enum Constant | Description |
---|---|
APPLICATION |
Specifies an application specific granularity.
|
APPLICATION_SESSION |
Specifies a Java runtime invokcation's session and an application
specific granularity.
|
HOST |
Specifies a host specific granularity.
|
HOST_APPLICATION |
Specifies an application on a host specific granularity.
|
HOST_APPLICATION_SESSION |
Specifies a Java runtime invokcation's session for an application on a
host specific granularity.
|
HOST_SESSION |
Specifies a Java runtime invokcation's session for a host specific
granularity.
|
HOST_USER |
Specifies a user on a host specific granularity.
|
HOST_USER_APPLICATION |
Specifies an application for a user on a host specific granularity.
|
HOST_USER_APPLICATION_SESSION |
Specifies a Java runtime invokcation's session for an application for a
user on a host specific granularity.
|
HOST_USER_SESSION |
Specifies a Java runtime invokcation's session for a user on a host
specific granularity.
|
SESSION |
Specifies a Java runtime invokcation's session specific granularity,
valid just for the current invocation of the Java runtime.
|
USER |
Specifies a user specific granularity.
|
USER_APPLICATION |
Specifies a user specific granularity.
|
USER_APPLICATION_SESSION |
Specifies a Java runtime invokcation's session and a user specific
granularity.
|
USER_SESSION |
Specifies a Java runtime invokcation's session for a user specific
granularity.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
isApplicationLevel() |
Determines whether the granularity is on an application level.
|
boolean |
isHostLevel() |
Determines whether the granularity is on a host level.
|
boolean |
isSessionLevel() |
Determines whether the granularity is on a session level, e.g. valid just
for the lifetime of the current runtime Java's invocation.
|
boolean |
isUserLevel() |
Determines whether the granularity is on a user level.
|
int |
toContextId() |
Creates an ID most probably unique as specified by the enumeration
instance this method is invoked on.
|
int |
toContextId(String aSeed) |
Creates an ID most probably unique as specified by the enumeration
instance this method is invoked on.
|
int[] |
toContextIds(int aIdLength) |
Creates an array of IDs most probably unique as specified by the provided
argument this method is invoked on.
|
int[] |
toContextIds(int aIdLength,
String aSeed) |
Creates an array of IDs most probably unique as specified by the provided
argument this method is invoked on.
|
String |
toContextSequence() |
Creates a
String most probably unique as specified by the
enumeration instance this method is invoked on. |
String |
toContextSequence(String aSeed) |
Creates a
String most probably unique as specified by the
enumeration instance this method is invoked on. |
static SystemContext |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static SystemContext[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SystemContext APPLICATION
public static final SystemContext USER_APPLICATION
public static final SystemContext HOST_USER_APPLICATION
public static final SystemContext HOST_APPLICATION
public static final SystemContext USER
public static final SystemContext HOST_USER
public static final SystemContext HOST
public static final SystemContext SESSION
public static final SystemContext APPLICATION_SESSION
public static final SystemContext USER_APPLICATION_SESSION
public static final SystemContext HOST_USER_APPLICATION_SESSION
public static final SystemContext HOST_APPLICATION_SESSION
public static final SystemContext USER_SESSION
public static final SystemContext HOST_USER_SESSION
public static final SystemContext HOST_SESSION
public static SystemContext[] values()
for (SystemContext c : SystemContext.values()) System.out.println(c);
public static SystemContext valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isHostLevel()
public boolean isUserLevel()
public boolean isApplicationLevel()
public boolean isSessionLevel()
public String toContextSequence()
String
most probably unique as specified by the
enumeration instance this method is invoked on. Attention: The result my
vary depending on the user under which the application is being executed!
Supports the environment variable EnvironmentVariable.HOST_SEED
as well as the system property SystemProperty.HOST_SEED
.
The enumeration value specifies the context for the created ID, e.g.
which system properties to take into account.String
.public String toContextSequence(String aSeed)
String
most probably unique as specified by the
enumeration instance this method is invoked on. Attention: The result my
vary depending on the user under which the application is being executed!
Supports the environment variable EnvironmentVariable.HOST_SEED
as well as the system property SystemProperty.HOST_SEED
.
The enumeration value specifies the context for the created ID, e.g.
which system properties to take into account.aSeed
- A seed to alter the ID individually.String
.public int toContextId()
EnvironmentVariable.HOST_SEED
as well as the system property SystemProperty.HOST_SEED
.
The enumeration value specifies the context for the created ID, e.g.
which system properties to take into account.public int toContextId(String aSeed)
EnvironmentVariable.HOST_SEED
as well as the system property
SystemProperty.HOST_SEED
.
System.out.println(System.getenv("PROCESSOR_ARCHITECTURE"));
System.out.println(System.getenv("PROCESSOR_ARCHITEW6432"));
System.getProperty("os.arch");
The enumeration value specifies the context for the created ID, e.g.
which system properties to take into account.aSeed
- A seed to alter the ID individually.public int[] toContextIds(int aIdLength)
EnvironmentVariable.HOST_SEED
as well as the system property
SystemProperty.HOST_SEED
.
The enumeration value specifies the context for the created ID, e.g.
which system properties to take into account.aIdLength
- The number of IDs to be generated.public int[] toContextIds(int aIdLength, String aSeed)
EnvironmentVariable.HOST_SEED
as well as the system property
SystemProperty.HOST_SEED
.
The enumeration value specifies the context for the created ID, e.g.
which system properties to take into account.aIdLength
- The number of IDs to be generated.aSeed
- A seed to alter the ID individually.Copyright © 2018. All rights reserved.