repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
wildfly/wildfly-core | deployment-repository/src/main/java/org/jboss/as/repository/ContentRepositoryImpl.java | ContentRepositoryImpl.markAsObsolete | private boolean markAsObsolete(ContentReference ref) {
if (obsoleteContents.containsKey(ref.getHexHash())) { //This content is already marked as obsolete
if (obsoleteContents.get(ref.getHexHash()) + obsolescenceTimeout < System.currentTimeMillis()) {
DeploymentRepositoryLogger.ROOT_L... | java | private boolean markAsObsolete(ContentReference ref) {
if (obsoleteContents.containsKey(ref.getHexHash())) { //This content is already marked as obsolete
if (obsoleteContents.get(ref.getHexHash()) + obsolescenceTimeout < System.currentTimeMillis()) {
DeploymentRepositoryLogger.ROOT_L... | [
"private",
"boolean",
"markAsObsolete",
"(",
"ContentReference",
"ref",
")",
"{",
"if",
"(",
"obsoleteContents",
".",
"containsKey",
"(",
"ref",
".",
"getHexHash",
"(",
")",
")",
")",
"{",
"//This content is already marked as obsolete",
"if",
"(",
"obsoleteContents"... | Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.
@param ref the content refrence to be marked as obsolete.
@return true if the content refrence is removed, fale otherwise. | [
"Mark",
"content",
"as",
"obsolete",
".",
"If",
"content",
"was",
"already",
"marked",
"for",
"obsolescenceTimeout",
"ms",
"then",
"it",
"is",
"removed",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/deployment-repository/src/main/java/org/jboss/as/repository/ContentRepositoryImpl.java#L372-L383 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java | ReadMasterDomainModelUtil.readMasterDomainResourcesForInitialConnect | static ReadMasterDomainModelUtil readMasterDomainResourcesForInitialConnect(final Transformers transformers,
final Transformers.TransformationInputs transformationInputs,
... | java | static ReadMasterDomainModelUtil readMasterDomainResourcesForInitialConnect(final Transformers transformers,
final Transformers.TransformationInputs transformationInputs,
... | [
"static",
"ReadMasterDomainModelUtil",
"readMasterDomainResourcesForInitialConnect",
"(",
"final",
"Transformers",
"transformers",
",",
"final",
"Transformers",
".",
"TransformationInputs",
"transformationInputs",
",",
"final",
"Transformers",
".",
"ResourceIgnoredTransformationReg... | Used to read the domain model when a slave host connects to the DC
@param transformers the transformers for the host
@param transformationInputs parameters for the transformation
@param ignoredTransformationRegistry registry of resources ignored by the transformation target
@param domainRoot the root resource for the ... | [
"Used",
"to",
"read",
"the",
"domain",
"model",
"when",
"a",
"slave",
"host",
"connects",
"to",
"the",
"DC"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java#L84-L93 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java | ReadMasterDomainModelUtil.describeAsNodeList | private List<ModelNode> describeAsNodeList(PathAddress rootAddress, final Resource resource, boolean isRuntimeChange) {
final List<ModelNode> list = new ArrayList<ModelNode>();
describe(rootAddress, resource, list, isRuntimeChange);
return list;
} | java | private List<ModelNode> describeAsNodeList(PathAddress rootAddress, final Resource resource, boolean isRuntimeChange) {
final List<ModelNode> list = new ArrayList<ModelNode>();
describe(rootAddress, resource, list, isRuntimeChange);
return list;
} | [
"private",
"List",
"<",
"ModelNode",
">",
"describeAsNodeList",
"(",
"PathAddress",
"rootAddress",
",",
"final",
"Resource",
"resource",
",",
"boolean",
"isRuntimeChange",
")",
"{",
"final",
"List",
"<",
"ModelNode",
">",
"list",
"=",
"new",
"ArrayList",
"<",
... | Describe the model as a list of resources with their address and model, which
the HC can directly apply to create the model. Although the format might appear
similar as the operations generated at boot-time this description is only useful
to create the resource tree and cannot be used to invoke any operation.
@param r... | [
"Describe",
"the",
"model",
"as",
"a",
"list",
"of",
"resources",
"with",
"their",
"address",
"and",
"model",
"which",
"the",
"HC",
"can",
"directly",
"apply",
"to",
"create",
"the",
"model",
".",
"Although",
"the",
"format",
"might",
"appear",
"similar",
... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java#L116-L121 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java | ReadMasterDomainModelUtil.populateHostResolutionContext | public static RequiredConfigurationHolder populateHostResolutionContext(final HostInfo hostInfo, final Resource root, final ExtensionRegistry extensionRegistry) {
final RequiredConfigurationHolder rc = new RequiredConfigurationHolder();
for (IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo info : hos... | java | public static RequiredConfigurationHolder populateHostResolutionContext(final HostInfo hostInfo, final Resource root, final ExtensionRegistry extensionRegistry) {
final RequiredConfigurationHolder rc = new RequiredConfigurationHolder();
for (IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo info : hos... | [
"public",
"static",
"RequiredConfigurationHolder",
"populateHostResolutionContext",
"(",
"final",
"HostInfo",
"hostInfo",
",",
"final",
"Resource",
"root",
",",
"final",
"ExtensionRegistry",
"extensionRegistry",
")",
"{",
"final",
"RequiredConfigurationHolder",
"rc",
"=",
... | Process the host info and determine which configuration elements are required on the slave host.
@param hostInfo the host info
@param root the model root
@param extensionRegistry the extension registry
@return | [
"Process",
"the",
"host",
"info",
"and",
"determine",
"which",
"configuration",
"elements",
"are",
"required",
"on",
"the",
"slave",
"host",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java#L224-L230 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java | ReadMasterDomainModelUtil.processServerConfig | static void processServerConfig(final Resource root, final RequiredConfigurationHolder requiredConfigurationHolder, final IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo serverConfig, final ExtensionRegistry extensionRegistry) {
final Set<String> serverGroups = requiredConfigurationHolder.serverGroups;
... | java | static void processServerConfig(final Resource root, final RequiredConfigurationHolder requiredConfigurationHolder, final IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo serverConfig, final ExtensionRegistry extensionRegistry) {
final Set<String> serverGroups = requiredConfigurationHolder.serverGroups;
... | [
"static",
"void",
"processServerConfig",
"(",
"final",
"Resource",
"root",
",",
"final",
"RequiredConfigurationHolder",
"requiredConfigurationHolder",
",",
"final",
"IgnoredNonAffectedServerGroupsUtil",
".",
"ServerConfigInfo",
"serverConfig",
",",
"final",
"ExtensionRegistry",... | Determine the relevant pieces of configuration which need to be included when processing the domain model.
@param root the resource root
@param requiredConfigurationHolder the resolution context
@param serverConfig the server config
@param extensionRegistry the extension registry | [
"Determine",
"the",
"relevant",
"pieces",
"of",
"configuration",
"which",
"need",
"to",
"be",
"included",
"when",
"processing",
"the",
"domain",
"model",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java#L240-L268 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java | ReadMasterDomainModelUtil.createServerIgnoredRegistry | public static Transformers.ResourceIgnoredTransformationRegistry createServerIgnoredRegistry(final RequiredConfigurationHolder rc, final Transformers.ResourceIgnoredTransformationRegistry delegate) {
return new Transformers.ResourceIgnoredTransformationRegistry() {
@Override
public boole... | java | public static Transformers.ResourceIgnoredTransformationRegistry createServerIgnoredRegistry(final RequiredConfigurationHolder rc, final Transformers.ResourceIgnoredTransformationRegistry delegate) {
return new Transformers.ResourceIgnoredTransformationRegistry() {
@Override
public boole... | [
"public",
"static",
"Transformers",
".",
"ResourceIgnoredTransformationRegistry",
"createServerIgnoredRegistry",
"(",
"final",
"RequiredConfigurationHolder",
"rc",
",",
"final",
"Transformers",
".",
"ResourceIgnoredTransformationRegistry",
"delegate",
")",
"{",
"return",
"new",... | Create the ResourceIgnoredTransformationRegistry when fetching missing content, only including relevant pieces
to a server-config.
@param rc the resolution context
@param delegate the delegate ignored resource transformation registry for manually ignored resources
@return | [
"Create",
"the",
"ResourceIgnoredTransformationRegistry",
"when",
"fetching",
"missing",
"content",
"only",
"including",
"relevant",
"pieces",
"to",
"a",
"server",
"-",
"config",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java#L422-L466 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java | IgnoredNonAffectedServerGroupsUtil.addCurrentServerGroupsToHostInfoModel | public static ModelNode addCurrentServerGroupsToHostInfoModel(boolean ignoreUnaffectedServerGroups, Resource hostModel, ModelNode model) {
if (!ignoreUnaffectedServerGroups) {
return model;
}
model.get(IGNORE_UNUSED_CONFIG).set(ignoreUnaffectedServerGroups);
addServerGroupsTo... | java | public static ModelNode addCurrentServerGroupsToHostInfoModel(boolean ignoreUnaffectedServerGroups, Resource hostModel, ModelNode model) {
if (!ignoreUnaffectedServerGroups) {
return model;
}
model.get(IGNORE_UNUSED_CONFIG).set(ignoreUnaffectedServerGroups);
addServerGroupsTo... | [
"public",
"static",
"ModelNode",
"addCurrentServerGroupsToHostInfoModel",
"(",
"boolean",
"ignoreUnaffectedServerGroups",
",",
"Resource",
"hostModel",
",",
"ModelNode",
"model",
")",
"{",
"if",
"(",
"!",
"ignoreUnaffectedServerGroups",
")",
"{",
"return",
"model",
";",... | Used by the slave host when creating the host info dmr sent across to the DC during the registration process
@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for
@param hostModel the resource containing the host model
@param model the dmr ... | [
"Used",
"by",
"the",
"slave",
"host",
"when",
"creating",
"the",
"host",
"info",
"dmr",
"sent",
"across",
"to",
"the",
"DC",
"during",
"the",
"registration",
"process"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java#L84-L91 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java | IgnoredNonAffectedServerGroupsUtil.ignoreOperation | public boolean ignoreOperation(final Resource domainResource, final Collection<ServerConfigInfo> serverConfigs, final PathAddress pathAddress) {
if (pathAddress.size() == 0) {
return false;
}
boolean ignore = ignoreResourceInternal(domainResource, serverConfigs, pathAddress);
... | java | public boolean ignoreOperation(final Resource domainResource, final Collection<ServerConfigInfo> serverConfigs, final PathAddress pathAddress) {
if (pathAddress.size() == 0) {
return false;
}
boolean ignore = ignoreResourceInternal(domainResource, serverConfigs, pathAddress);
... | [
"public",
"boolean",
"ignoreOperation",
"(",
"final",
"Resource",
"domainResource",
",",
"final",
"Collection",
"<",
"ServerConfigInfo",
">",
"serverConfigs",
",",
"final",
"PathAddress",
"pathAddress",
")",
"{",
"if",
"(",
"pathAddress",
".",
"size",
"(",
")",
... | For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it
@param domainResource the domain root resource
@param serverConfigs the server configs the slave is known to have
@param pathAddress the address of the operation to check if should be ign... | [
"For",
"the",
"DC",
"to",
"check",
"whether",
"an",
"operation",
"should",
"be",
"ignored",
"on",
"the",
"slave",
"if",
"the",
"slave",
"is",
"set",
"up",
"to",
"ignore",
"config",
"not",
"relevant",
"to",
"it"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java#L128-L134 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java | IgnoredNonAffectedServerGroupsUtil.getServerConfigsOnSlave | public Set<ServerConfigInfo> getServerConfigsOnSlave(Resource hostResource){
Set<ServerConfigInfo> groups = new HashSet<>();
for (ResourceEntry entry : hostResource.getChildren(SERVER_CONFIG)) {
groups.add(new ServerConfigInfoImpl(entry.getModel()));
}
return groups;
} | java | public Set<ServerConfigInfo> getServerConfigsOnSlave(Resource hostResource){
Set<ServerConfigInfo> groups = new HashSet<>();
for (ResourceEntry entry : hostResource.getChildren(SERVER_CONFIG)) {
groups.add(new ServerConfigInfoImpl(entry.getModel()));
}
return groups;
} | [
"public",
"Set",
"<",
"ServerConfigInfo",
">",
"getServerConfigsOnSlave",
"(",
"Resource",
"hostResource",
")",
"{",
"Set",
"<",
"ServerConfigInfo",
">",
"groups",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"for",
"(",
"ResourceEntry",
"entry",
":",
"hostReso... | For use on a slave HC to get all the server groups used by the host
@param hostResource the host resource
@return the server configs on this host | [
"For",
"use",
"on",
"a",
"slave",
"HC",
"to",
"get",
"all",
"the",
"server",
"groups",
"used",
"by",
"the",
"host"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java#L261-L267 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/SyncModelOperationHandlerWrapper.java | SyncModelOperationHandlerWrapper.syncWithMaster | private static boolean syncWithMaster(final Resource domain, final PathElement hostElement) {
final Resource host = domain.getChild(hostElement);
assert host != null;
final Set<String> profiles = new HashSet<>();
final Set<String> serverGroups = new HashSet<>();
final Set<String... | java | private static boolean syncWithMaster(final Resource domain, final PathElement hostElement) {
final Resource host = domain.getChild(hostElement);
assert host != null;
final Set<String> profiles = new HashSet<>();
final Set<String> serverGroups = new HashSet<>();
final Set<String... | [
"private",
"static",
"boolean",
"syncWithMaster",
"(",
"final",
"Resource",
"domain",
",",
"final",
"PathElement",
"hostElement",
")",
"{",
"final",
"Resource",
"host",
"=",
"domain",
".",
"getChild",
"(",
"hostElement",
")",
";",
"assert",
"host",
"!=",
"null... | Determine whether all references are available locally.
@param domain the domain model
@param hostElement the host path element
@return whether to a sync with the master is required | [
"Determine",
"whether",
"all",
"references",
"are",
"available",
"locally",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/SyncModelOperationHandlerWrapper.java#L154-L216 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/scriptsupport/CLI.java | CLI.cmd | public Result cmd(String cliCommand) {
try {
// The intent here is to return a Response when this is doable.
if (ctx.isWorkflowMode() || ctx.isBatchMode()) {
ctx.handle(cliCommand);
return new Result(cliCommand, ctx.getExitCode());
}
... | java | public Result cmd(String cliCommand) {
try {
// The intent here is to return a Response when this is doable.
if (ctx.isWorkflowMode() || ctx.isBatchMode()) {
ctx.handle(cliCommand);
return new Result(cliCommand, ctx.getExitCode());
}
... | [
"public",
"Result",
"cmd",
"(",
"String",
"cliCommand",
")",
"{",
"try",
"{",
"// The intent here is to return a Response when this is doable.",
"if",
"(",
"ctx",
".",
"isWorkflowMode",
"(",
")",
"||",
"ctx",
".",
"isBatchMode",
"(",
")",
")",
"{",
"ctx",
".",
... | Execute a CLI command. This can be any command that you might execute on
the CLI command line, including both server-side operations and local
commands such as 'cd' or 'cn'.
@param cliCommand A CLI command.
@return A result object that provides all information about the execution
of the command. | [
"Execute",
"a",
"CLI",
"command",
".",
"This",
"can",
"be",
"any",
"command",
"that",
"you",
"might",
"execute",
"on",
"the",
"CLI",
"command",
"line",
"including",
"both",
"server",
"-",
"side",
"operations",
"and",
"local",
"commands",
"such",
"as",
"cd"... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/scriptsupport/CLI.java#L231-L254 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java | AbstractControllerService.boot | protected void boot(final BootContext context) throws ConfigurationPersistenceException {
List<ModelNode> bootOps = configurationPersister.load();
ModelNode op = registerModelControllerServiceInitializationBootStep(context);
if (op != null) {
bootOps.add(op);
}
boot(b... | java | protected void boot(final BootContext context) throws ConfigurationPersistenceException {
List<ModelNode> bootOps = configurationPersister.load();
ModelNode op = registerModelControllerServiceInitializationBootStep(context);
if (op != null) {
bootOps.add(op);
}
boot(b... | [
"protected",
"void",
"boot",
"(",
"final",
"BootContext",
"context",
")",
"throws",
"ConfigurationPersistenceException",
"{",
"List",
"<",
"ModelNode",
">",
"bootOps",
"=",
"configurationPersister",
".",
"load",
"(",
")",
";",
"ModelNode",
"op",
"=",
"registerMode... | Boot the controller. Called during service start.
@param context the boot context
@throws ConfigurationPersistenceException
if the configuration failed to be loaded | [
"Boot",
"the",
"controller",
".",
"Called",
"during",
"service",
"start",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java#L415-L423 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java | AbstractControllerService.boot | protected boolean boot(List<ModelNode> bootOperations, boolean rollbackOnRuntimeFailure) throws ConfigurationPersistenceException {
return boot(bootOperations, rollbackOnRuntimeFailure, false, ModelControllerImpl.getMutableRootResourceRegistrationProvider());
} | java | protected boolean boot(List<ModelNode> bootOperations, boolean rollbackOnRuntimeFailure) throws ConfigurationPersistenceException {
return boot(bootOperations, rollbackOnRuntimeFailure, false, ModelControllerImpl.getMutableRootResourceRegistrationProvider());
} | [
"protected",
"boolean",
"boot",
"(",
"List",
"<",
"ModelNode",
">",
"bootOperations",
",",
"boolean",
"rollbackOnRuntimeFailure",
")",
"throws",
"ConfigurationPersistenceException",
"{",
"return",
"boot",
"(",
"bootOperations",
",",
"rollbackOnRuntimeFailure",
",",
"fal... | Boot with the given operations, performing full model and capability registry validation.
@param bootOperations the operations. Cannot be {@code null}
@param rollbackOnRuntimeFailure {@code true} if the boot should fail if operations fail in the runtime stage
@return {@code true} if boot was successful
@throws Configu... | [
"Boot",
"with",
"the",
"given",
"operations",
"performing",
"full",
"model",
"and",
"capability",
"registry",
"validation",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java#L433-L435 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/logger/Messages.java | Messages.getBundle | public static <T> T getBundle(final Class<T> type) {
return doPrivileged(new PrivilegedAction<T>() {
public T run() {
final Locale locale = Locale.getDefault();
final String lang = locale.getLanguage();
final String country = locale.getCountry();
... | java | public static <T> T getBundle(final Class<T> type) {
return doPrivileged(new PrivilegedAction<T>() {
public T run() {
final Locale locale = Locale.getDefault();
final String lang = locale.getLanguage();
final String country = locale.getCountry();
... | [
"public",
"static",
"<",
"T",
">",
"T",
"getBundle",
"(",
"final",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"return",
"doPrivileged",
"(",
"new",
"PrivilegedAction",
"<",
"T",
">",
"(",
")",
"{",
"public",
"T",
"run",
"(",
")",
"{",
"final",
"Loca... | Get a message bundle of the given type.
@param type the bundle type class
@return the bundle | [
"Get",
"a",
"message",
"bundle",
"of",
"the",
"given",
"type",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/logger/Messages.java#L49-L91 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/access/Caller.java | Caller.getName | public String getName() {
if (name == null && securityIdentity != null) {
name = securityIdentity.getPrincipal().getName();
}
return name;
} | java | public String getName() {
if (name == null && securityIdentity != null) {
name = securityIdentity.getPrincipal().getName();
}
return name;
} | [
"public",
"String",
"getName",
"(",
")",
"{",
"if",
"(",
"name",
"==",
"null",
"&&",
"securityIdentity",
"!=",
"null",
")",
"{",
"name",
"=",
"securityIdentity",
".",
"getPrincipal",
"(",
")",
".",
"getName",
"(",
")",
";",
"}",
"return",
"name",
";",
... | Obtain the name of the caller, most likely a user but could also be a remote process.
@return The name of the caller. | [
"Obtain",
"the",
"name",
"of",
"the",
"caller",
"most",
"likely",
"a",
"user",
"but",
"could",
"also",
"be",
"a",
"remote",
"process",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/access/Caller.java#L72-L78 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/access/Caller.java | Caller.getRealm | public String getRealm() {
if (UNDEFINED.equals(realm)) {
Principal principal = securityIdentity.getPrincipal();
String realm = null;
if (principal instanceof RealmPrincipal) {
realm = ((RealmPrincipal)principal).getRealm();
}
this.real... | java | public String getRealm() {
if (UNDEFINED.equals(realm)) {
Principal principal = securityIdentity.getPrincipal();
String realm = null;
if (principal instanceof RealmPrincipal) {
realm = ((RealmPrincipal)principal).getRealm();
}
this.real... | [
"public",
"String",
"getRealm",
"(",
")",
"{",
"if",
"(",
"UNDEFINED",
".",
"equals",
"(",
"realm",
")",
")",
"{",
"Principal",
"principal",
"=",
"securityIdentity",
".",
"getPrincipal",
"(",
")",
";",
"String",
"realm",
"=",
"null",
";",
"if",
"(",
"p... | Obtain the realm used for authentication.
This realm name applies to both the user and the groups.
@return The name of the realm used for authentication. | [
"Obtain",
"the",
"realm",
"used",
"for",
"authentication",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/access/Caller.java#L87-L99 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java | RemoteDomainConnectionService.resolveSubsystems | private ModelNode resolveSubsystems(final List<ModelNode> extensions) {
HostControllerLogger.ROOT_LOGGER.debug("Applying extensions provided by master");
final ModelNode result = operationExecutor.installSlaveExtensions(extensions);
if (!SUCCESS.equals(result.get(OUTCOME).asString())) {
... | java | private ModelNode resolveSubsystems(final List<ModelNode> extensions) {
HostControllerLogger.ROOT_LOGGER.debug("Applying extensions provided by master");
final ModelNode result = operationExecutor.installSlaveExtensions(extensions);
if (!SUCCESS.equals(result.get(OUTCOME).asString())) {
... | [
"private",
"ModelNode",
"resolveSubsystems",
"(",
"final",
"List",
"<",
"ModelNode",
">",
"extensions",
")",
"{",
"HostControllerLogger",
".",
"ROOT_LOGGER",
".",
"debug",
"(",
"\"Applying extensions provided by master\"",
")",
";",
"final",
"ModelNode",
"result",
"="... | Resolve the subsystem versions.
@param extensions the extensions to install
@return the subsystem versions | [
"Resolve",
"the",
"subsystem",
"versions",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java#L572-L584 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java | RemoteDomainConnectionService.applyRemoteDomainModel | private boolean applyRemoteDomainModel(final List<ModelNode> bootOperations, final HostInfo hostInfo) {
try {
HostControllerLogger.ROOT_LOGGER.debug("Applying domain level boot operations provided by master");
SyncModelParameters parameters =
new SyncModelParameters(d... | java | private boolean applyRemoteDomainModel(final List<ModelNode> bootOperations, final HostInfo hostInfo) {
try {
HostControllerLogger.ROOT_LOGGER.debug("Applying domain level boot operations provided by master");
SyncModelParameters parameters =
new SyncModelParameters(d... | [
"private",
"boolean",
"applyRemoteDomainModel",
"(",
"final",
"List",
"<",
"ModelNode",
">",
"bootOperations",
",",
"final",
"HostInfo",
"hostInfo",
")",
"{",
"try",
"{",
"HostControllerLogger",
".",
"ROOT_LOGGER",
".",
"debug",
"(",
"\"Applying domain level boot oper... | Apply the remote domain model to the local host controller.
@param bootOperations the result of the remote read-domain-model op
@return {@code true} if the model was applied successfully, {@code false} otherwise | [
"Apply",
"the",
"remote",
"domain",
"model",
"to",
"the",
"local",
"host",
"controller",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java#L592-L630 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java | RemoteDomainConnectionService.rethrowIrrecoverableConnectionFailures | static void rethrowIrrecoverableConnectionFailures(IOException e) throws SlaveRegistrationException {
Throwable cause = e;
while ((cause = cause.getCause()) != null) {
if (cause instanceof SaslException) {
throw HostControllerLogger.ROOT_LOGGER.authenticationFailureUnableToCo... | java | static void rethrowIrrecoverableConnectionFailures(IOException e) throws SlaveRegistrationException {
Throwable cause = e;
while ((cause = cause.getCause()) != null) {
if (cause instanceof SaslException) {
throw HostControllerLogger.ROOT_LOGGER.authenticationFailureUnableToCo... | [
"static",
"void",
"rethrowIrrecoverableConnectionFailures",
"(",
"IOException",
"e",
")",
"throws",
"SlaveRegistrationException",
"{",
"Throwable",
"cause",
"=",
"e",
";",
"while",
"(",
"(",
"cause",
"=",
"cause",
".",
"getCause",
"(",
")",
")",
"!=",
"null",
... | Analyzes a failure thrown connecting to the master for causes that indicate
some problem not likely to be resolved by immediately retrying. If found,
throws an exception highlighting the underlying cause. If the cause is not
one of the ones understood by this method, the method returns normally.
@throws org.jboss.as.d... | [
"Analyzes",
"a",
"failure",
"thrown",
"connecting",
"to",
"the",
"master",
"for",
"causes",
"that",
"indicate",
"some",
"problem",
"not",
"likely",
"to",
"be",
"resolved",
"by",
"immediately",
"retrying",
".",
"If",
"found",
"throws",
"an",
"exception",
"highl... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java#L670-L681 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java | RemoteDomainConnectionService.logConnectionException | static void logConnectionException(URI uri, DiscoveryOption discoveryOption, boolean moreOptions, Exception e) {
if (uri == null) {
HostControllerLogger.ROOT_LOGGER.failedDiscoveringMaster(discoveryOption, e);
} else {
HostControllerLogger.ROOT_LOGGER.cannotConnect(uri, e);
... | java | static void logConnectionException(URI uri, DiscoveryOption discoveryOption, boolean moreOptions, Exception e) {
if (uri == null) {
HostControllerLogger.ROOT_LOGGER.failedDiscoveringMaster(discoveryOption, e);
} else {
HostControllerLogger.ROOT_LOGGER.cannotConnect(uri, e);
... | [
"static",
"void",
"logConnectionException",
"(",
"URI",
"uri",
",",
"DiscoveryOption",
"discoveryOption",
",",
"boolean",
"moreOptions",
",",
"Exception",
"e",
")",
"{",
"if",
"(",
"uri",
"==",
"null",
")",
"{",
"HostControllerLogger",
".",
"ROOT_LOGGER",
".",
... | Handles logging tasks related to a failure to connect to a remote HC.
@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC
@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}
@param moreOptions {@code true} if there are mor... | [
"Handles",
"logging",
"tasks",
"related",
"to",
"a",
"failure",
"to",
"connect",
"to",
"a",
"remote",
"HC",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnectionService.java#L690-L700 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/AliasOperationTransformer.java | AliasOperationTransformer.replaceLastElement | public static AliasOperationTransformer replaceLastElement(final PathElement element) {
return create(new AddressTransformer() {
@Override
public PathAddress transformAddress(final PathAddress original) {
final PathAddress address = original.subAddress(0, original.size() ... | java | public static AliasOperationTransformer replaceLastElement(final PathElement element) {
return create(new AddressTransformer() {
@Override
public PathAddress transformAddress(final PathAddress original) {
final PathAddress address = original.subAddress(0, original.size() ... | [
"public",
"static",
"AliasOperationTransformer",
"replaceLastElement",
"(",
"final",
"PathElement",
"element",
")",
"{",
"return",
"create",
"(",
"new",
"AddressTransformer",
"(",
")",
"{",
"@",
"Override",
"public",
"PathAddress",
"transformAddress",
"(",
"final",
... | Replace the last element of an address with a static path element.
@param element the path element
@return the operation address transformer | [
"Replace",
"the",
"last",
"element",
"of",
"an",
"address",
"with",
"a",
"static",
"path",
"element",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/AliasOperationTransformer.java#L91-L99 | train |
wildfly/wildfly-core | domain-management/src/main/java/org/jboss/as/domain/management/security/adduser/UpdatePropertiesHandler.java | UpdatePropertiesHandler.persist | void persist(final String key, final String value, final boolean enableDisableMode, final boolean disable, final File file) throws IOException, StartException {
persist(key, value, enableDisableMode, disable, file, null);
} | java | void persist(final String key, final String value, final boolean enableDisableMode, final boolean disable, final File file) throws IOException, StartException {
persist(key, value, enableDisableMode, disable, file, null);
} | [
"void",
"persist",
"(",
"final",
"String",
"key",
",",
"final",
"String",
"value",
",",
"final",
"boolean",
"enableDisableMode",
",",
"final",
"boolean",
"disable",
",",
"final",
"File",
"file",
")",
"throws",
"IOException",
",",
"StartException",
"{",
"persis... | Implement the persistence handler for storing the group properties. | [
"Implement",
"the",
"persistence",
"handler",
"for",
"storing",
"the",
"group",
"properties",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/security/adduser/UpdatePropertiesHandler.java#L49-L51 | train |
wildfly/wildfly-core | domain-management/src/main/java/org/jboss/as/domain/management/security/adduser/UpdatePropertiesHandler.java | UpdatePropertiesHandler.persist | void persist(final String key, final String value, final boolean enableDisableMode, final boolean disable, final File file, final String realm) throws IOException, StartException {
final PropertiesFileLoader propertiesHandler = realm == null ? new PropertiesFileLoader(file.getAbsolutePath(), null) :
... | java | void persist(final String key, final String value, final boolean enableDisableMode, final boolean disable, final File file, final String realm) throws IOException, StartException {
final PropertiesFileLoader propertiesHandler = realm == null ? new PropertiesFileLoader(file.getAbsolutePath(), null) :
... | [
"void",
"persist",
"(",
"final",
"String",
"key",
",",
"final",
"String",
"value",
",",
"final",
"boolean",
"enableDisableMode",
",",
"final",
"boolean",
"disable",
",",
"final",
"File",
"file",
",",
"final",
"String",
"realm",
")",
"throws",
"IOException",
... | Implement the persistence handler for storing the user properties. | [
"Implement",
"the",
"persistence",
"handler",
"for",
"storing",
"the",
"user",
"properties",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/security/adduser/UpdatePropertiesHandler.java#L56-L75 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/Services.java | Services.deploymentUnitName | public static ServiceName deploymentUnitName(String name, Phase phase) {
return JBOSS_DEPLOYMENT_UNIT.append(name, phase.name());
} | java | public static ServiceName deploymentUnitName(String name, Phase phase) {
return JBOSS_DEPLOYMENT_UNIT.append(name, phase.name());
} | [
"public",
"static",
"ServiceName",
"deploymentUnitName",
"(",
"String",
"name",
",",
"Phase",
"phase",
")",
"{",
"return",
"JBOSS_DEPLOYMENT_UNIT",
".",
"append",
"(",
"name",
",",
"phase",
".",
"name",
"(",
")",
")",
";",
"}"
] | Get the service name of a top-level deployment unit.
@param name the simple name of the deployment
@param phase the deployment phase
@return the service name | [
"Get",
"the",
"service",
"name",
"of",
"a",
"top",
"-",
"level",
"deployment",
"unit",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/Services.java#L83-L85 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractModelUpdateHandler.java | AbstractModelUpdateHandler.updateModel | protected void updateModel(final ModelNode operation, final Resource resource) throws OperationFailedException {
updateModel(operation, resource.getModel());
} | java | protected void updateModel(final ModelNode operation, final Resource resource) throws OperationFailedException {
updateModel(operation, resource.getModel());
} | [
"protected",
"void",
"updateModel",
"(",
"final",
"ModelNode",
"operation",
",",
"final",
"Resource",
"resource",
")",
"throws",
"OperationFailedException",
"{",
"updateModel",
"(",
"operation",
",",
"resource",
".",
"getModel",
"(",
")",
")",
";",
"}"
] | Update the given resource in the persistent configuration model based on the values in the given operation.
@param operation the operation
@param resource the resource that corresponds to the address of {@code operation}
@throws OperationFailedException if {@code operation} is invalid or populating the model otherwis... | [
"Update",
"the",
"given",
"resource",
"in",
"the",
"persistent",
"configuration",
"model",
"based",
"on",
"the",
"values",
"in",
"the",
"given",
"operation",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractModelUpdateHandler.java#L64-L66 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.logAttributeWarning | public void logAttributeWarning(PathAddress address, String attribute) {
logAttributeWarning(address, null, null, attribute);
} | java | public void logAttributeWarning(PathAddress address, String attribute) {
logAttributeWarning(address, null, null, attribute);
} | [
"public",
"void",
"logAttributeWarning",
"(",
"PathAddress",
"address",
",",
"String",
"attribute",
")",
"{",
"logAttributeWarning",
"(",
"address",
",",
"null",
",",
"null",
",",
"attribute",
")",
";",
"}"
] | Log a warning for the resource at the provided address and a single attribute. The detail message is a default
'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'
@param address where warning occurred
@param attribute attribute we are warning abou... | [
"Log",
"a",
"warning",
"for",
"the",
"resource",
"at",
"the",
"provided",
"address",
"and",
"a",
"single",
"attribute",
".",
"The",
"detail",
"message",
"is",
"a",
"default",
"Attributes",
"are",
"not",
"understood",
"in",
"the",
"target",
"model",
"version"... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L98-L100 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.logAttributeWarning | public void logAttributeWarning(PathAddress address, Set<String> attributes) {
logAttributeWarning(address, null, null, attributes);
} | java | public void logAttributeWarning(PathAddress address, Set<String> attributes) {
logAttributeWarning(address, null, null, attributes);
} | [
"public",
"void",
"logAttributeWarning",
"(",
"PathAddress",
"address",
",",
"Set",
"<",
"String",
">",
"attributes",
")",
"{",
"logAttributeWarning",
"(",
"address",
",",
"null",
",",
"null",
",",
"attributes",
")",
";",
"}"
] | Log a warning for the resource at the provided address and the given attributes. The detail message is a default
'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'
@param address where warning occurred
@param attributes attributes we are warning... | [
"Log",
"a",
"warning",
"for",
"the",
"resource",
"at",
"the",
"provided",
"address",
"and",
"the",
"given",
"attributes",
".",
"The",
"detail",
"message",
"is",
"a",
"default",
"Attributes",
"are",
"not",
"understood",
"in",
"the",
"target",
"model",
"versio... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L109-L111 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.logAttributeWarning | public void logAttributeWarning(PathAddress address, String message, String attribute) {
logAttributeWarning(address, null, message, attribute);
} | java | public void logAttributeWarning(PathAddress address, String message, String attribute) {
logAttributeWarning(address, null, message, attribute);
} | [
"public",
"void",
"logAttributeWarning",
"(",
"PathAddress",
"address",
",",
"String",
"message",
",",
"String",
"attribute",
")",
"{",
"logAttributeWarning",
"(",
"address",
",",
"null",
",",
"message",
",",
"attribute",
")",
";",
"}"
] | Log warning for the resource at the provided address and single attribute, using the provided detail
message.
@param address where warning occurred
@param message custom error message to append
@param attribute attribute we are warning about | [
"Log",
"warning",
"for",
"the",
"resource",
"at",
"the",
"provided",
"address",
"and",
"single",
"attribute",
"using",
"the",
"provided",
"detail",
"message",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L121-L123 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.logAttributeWarning | public void logAttributeWarning(PathAddress address, String message, Set<String> attributes) {
messageQueue.add(new AttributeLogEntry(address, null, message, attributes));
} | java | public void logAttributeWarning(PathAddress address, String message, Set<String> attributes) {
messageQueue.add(new AttributeLogEntry(address, null, message, attributes));
} | [
"public",
"void",
"logAttributeWarning",
"(",
"PathAddress",
"address",
",",
"String",
"message",
",",
"Set",
"<",
"String",
">",
"attributes",
")",
"{",
"messageQueue",
".",
"add",
"(",
"new",
"AttributeLogEntry",
"(",
"address",
",",
"null",
",",
"message",
... | Log a warning for the resource at the provided address and the given attributes, using the provided detail
message.
@param address where warning occurred
@param message custom error message to append
@param attributes attributes we that have problems about | [
"Log",
"a",
"warning",
"for",
"the",
"resource",
"at",
"the",
"provided",
"address",
"and",
"the",
"given",
"attributes",
"using",
"the",
"provided",
"detail",
"message",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L133-L135 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.logAttributeWarning | public void logAttributeWarning(PathAddress address, ModelNode operation, String message, String attribute) {
messageQueue.add(new AttributeLogEntry(address, operation, message, attribute));
} | java | public void logAttributeWarning(PathAddress address, ModelNode operation, String message, String attribute) {
messageQueue.add(new AttributeLogEntry(address, operation, message, attribute));
} | [
"public",
"void",
"logAttributeWarning",
"(",
"PathAddress",
"address",
",",
"ModelNode",
"operation",
",",
"String",
"message",
",",
"String",
"attribute",
")",
"{",
"messageQueue",
".",
"add",
"(",
"new",
"AttributeLogEntry",
"(",
"address",
",",
"operation",
... | Log a warning for the given operation at the provided address for the given attribute, using the provided detail
message.
@param address where warning occurred
@param operation where which problem occurred
@param message custom error message to append
@param attribute attribute we that has problem | [
"Log",
"a",
"warning",
"for",
"the",
"given",
"operation",
"at",
"the",
"provided",
"address",
"for",
"the",
"given",
"attribute",
"using",
"the",
"provided",
"detail",
"message",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L147-L149 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.logAttributeWarning | public void logAttributeWarning(PathAddress address, ModelNode operation, String message, Set<String> attributes) {
messageQueue.add(new AttributeLogEntry(address, operation, message, attributes));
} | java | public void logAttributeWarning(PathAddress address, ModelNode operation, String message, Set<String> attributes) {
messageQueue.add(new AttributeLogEntry(address, operation, message, attributes));
} | [
"public",
"void",
"logAttributeWarning",
"(",
"PathAddress",
"address",
",",
"ModelNode",
"operation",
",",
"String",
"message",
",",
"Set",
"<",
"String",
">",
"attributes",
")",
"{",
"messageQueue",
".",
"add",
"(",
"new",
"AttributeLogEntry",
"(",
"address",
... | Log a warning for the given operation at the provided address for the given attributes, using the provided detail
message.
@param address where warning occurred
@param operation where which problem occurred
@param message custom error message to append
@param attributes attributes we that have problems about | [
"Log",
"a",
"warning",
"for",
"the",
"given",
"operation",
"at",
"the",
"provided",
"address",
"for",
"the",
"given",
"attributes",
"using",
"the",
"provided",
"detail",
"message",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L160-L162 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.logWarning | public void logWarning(final String message) {
messageQueue.add(new LogEntry() {
@Override
public String getMessage() {
return message;
}
});
} | java | public void logWarning(final String message) {
messageQueue.add(new LogEntry() {
@Override
public String getMessage() {
return message;
}
});
} | [
"public",
"void",
"logWarning",
"(",
"final",
"String",
"message",
")",
"{",
"messageQueue",
".",
"add",
"(",
"new",
"LogEntry",
"(",
")",
"{",
"@",
"Override",
"public",
"String",
"getMessage",
"(",
")",
"{",
"return",
"message",
";",
"}",
"}",
")",
"... | Log a free-form warning
@param message the warning message. Cannot be {@code null} | [
"Log",
"a",
"free",
"-",
"form",
"warning"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L242-L249 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java | TransformersLogger.flushLogQueue | void flushLogQueue() {
Set<String> problems = new LinkedHashSet<String>();
synchronized (messageQueue) {
Iterator<LogEntry> i = messageQueue.iterator();
while (i.hasNext()) {
problems.add("\t\t" + i.next().getMessage() + "\n");
i.remove();
... | java | void flushLogQueue() {
Set<String> problems = new LinkedHashSet<String>();
synchronized (messageQueue) {
Iterator<LogEntry> i = messageQueue.iterator();
while (i.hasNext()) {
problems.add("\t\t" + i.next().getMessage() + "\n");
i.remove();
... | [
"void",
"flushLogQueue",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"problems",
"=",
"new",
"LinkedHashSet",
"<",
"String",
">",
"(",
")",
";",
"synchronized",
"(",
"messageQueue",
")",
"{",
"Iterator",
"<",
"LogEntry",
">",
"i",
"=",
"messageQueue",
".",... | flushes log queue, this actually writes combined log message into system log | [
"flushes",
"log",
"queue",
"this",
"actually",
"writes",
"combined",
"log",
"message",
"into",
"system",
"log"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L254-L266 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.getEntry | PatchEntry getEntry(final String name, boolean addOn) {
return addOn ? addOns.get(name) : layers.get(name);
} | java | PatchEntry getEntry(final String name, boolean addOn) {
return addOn ? addOns.get(name) : layers.get(name);
} | [
"PatchEntry",
"getEntry",
"(",
"final",
"String",
"name",
",",
"boolean",
"addOn",
")",
"{",
"return",
"addOn",
"?",
"addOns",
".",
"get",
"(",
"name",
")",
":",
"layers",
".",
"get",
"(",
"name",
")",
";",
"}"
] | Get a patch entry for either a layer or add-on.
@param name the layer name
@param addOn whether the target is an add-on
@return the patch entry, {@code null} if it there is no such layer | [
"Get",
"a",
"patch",
"entry",
"for",
"either",
"a",
"layer",
"or",
"add",
"-",
"on",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L135-L137 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.failedToCleanupDir | protected void failedToCleanupDir(final File file) {
checkForGarbageOnRestart = true;
PatchLogger.ROOT_LOGGER.cannotDeleteFile(file.getAbsolutePath());
} | java | protected void failedToCleanupDir(final File file) {
checkForGarbageOnRestart = true;
PatchLogger.ROOT_LOGGER.cannotDeleteFile(file.getAbsolutePath());
} | [
"protected",
"void",
"failedToCleanupDir",
"(",
"final",
"File",
"file",
")",
"{",
"checkForGarbageOnRestart",
"=",
"true",
";",
"PatchLogger",
".",
"ROOT_LOGGER",
".",
"cannotDeleteFile",
"(",
"file",
".",
"getAbsolutePath",
"(",
")",
")",
";",
"}"
] | In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not
referenced directories and files.
@param file the directory | [
"In",
"case",
"we",
"cannot",
"delete",
"a",
"directory",
"create",
"a",
"marker",
"to",
"recheck",
"whether",
"we",
"can",
"garbage",
"collect",
"some",
"not",
"referenced",
"directories",
"and",
"files",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L190-L193 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.resolveForElement | protected PatchEntry resolveForElement(final PatchElement element) throws PatchingException {
assert state == State.NEW;
final PatchElementProvider provider = element.getProvider();
final String layerName = provider.getName();
final LayerType layerType = provider.getLayerType();
... | java | protected PatchEntry resolveForElement(final PatchElement element) throws PatchingException {
assert state == State.NEW;
final PatchElementProvider provider = element.getProvider();
final String layerName = provider.getName();
final LayerType layerType = provider.getLayerType();
... | [
"protected",
"PatchEntry",
"resolveForElement",
"(",
"final",
"PatchElement",
"element",
")",
"throws",
"PatchingException",
"{",
"assert",
"state",
"==",
"State",
".",
"NEW",
";",
"final",
"PatchElementProvider",
"provider",
"=",
"element",
".",
"getProvider",
"(",... | Get the target entry for a given patch element.
@param element the patch element
@return the patch entry
@throws PatchingException | [
"Get",
"the",
"target",
"entry",
"for",
"a",
"given",
"patch",
"element",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L226-L250 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.complete | private void complete(final InstallationManager.InstallationModification modification, final FinalizeCallback callback) {
final List<File> processed = new ArrayList<File>();
List<File> reenabled = Collections.emptyList();
List<File> disabled = Collections.emptyList();
try {
t... | java | private void complete(final InstallationManager.InstallationModification modification, final FinalizeCallback callback) {
final List<File> processed = new ArrayList<File>();
List<File> reenabled = Collections.emptyList();
List<File> disabled = Collections.emptyList();
try {
t... | [
"private",
"void",
"complete",
"(",
"final",
"InstallationManager",
".",
"InstallationModification",
"modification",
",",
"final",
"FinalizeCallback",
"callback",
")",
"{",
"final",
"List",
"<",
"File",
">",
"processed",
"=",
"new",
"ArrayList",
"<",
"File",
">",
... | Complete the current operation and persist the current state to the disk. This will also trigger the invalidation
of outdated modules.
@param modification the current modification
@param callback the completion callback | [
"Complete",
"the",
"current",
"operation",
"and",
"persist",
"the",
"current",
"state",
"to",
"the",
"disk",
".",
"This",
"will",
"also",
"trigger",
"the",
"invalidation",
"of",
"outdated",
"modules",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L352-L419 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.undoChanges | boolean undoChanges() {
final State state = stateUpdater.getAndSet(this, State.ROLLBACK_ONLY);
if (state == State.COMPLETED || state == State.ROLLBACK_ONLY) {
// Was actually completed already
return false;
}
PatchingTaskContext.Mode currentMode = this.mode;
... | java | boolean undoChanges() {
final State state = stateUpdater.getAndSet(this, State.ROLLBACK_ONLY);
if (state == State.COMPLETED || state == State.ROLLBACK_ONLY) {
// Was actually completed already
return false;
}
PatchingTaskContext.Mode currentMode = this.mode;
... | [
"boolean",
"undoChanges",
"(",
")",
"{",
"final",
"State",
"state",
"=",
"stateUpdater",
".",
"getAndSet",
"(",
"this",
",",
"State",
".",
"ROLLBACK_ONLY",
")",
";",
"if",
"(",
"state",
"==",
"State",
".",
"COMPLETED",
"||",
"state",
"==",
"State",
".",
... | Internally undo recorded changes we did so far.
@return whether the state required undo actions | [
"Internally",
"undo",
"recorded",
"changes",
"we",
"did",
"so",
"far",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L437-L480 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.undoChanges | static void undoChanges(final PatchEntry entry, final PatchContentLoader loader) {
final List<ContentModification> modifications = new ArrayList<ContentModification>(entry.rollbackActions);
for (final ContentModification modification : modifications) {
final ContentItem item = modification.g... | java | static void undoChanges(final PatchEntry entry, final PatchContentLoader loader) {
final List<ContentModification> modifications = new ArrayList<ContentModification>(entry.rollbackActions);
for (final ContentModification modification : modifications) {
final ContentItem item = modification.g... | [
"static",
"void",
"undoChanges",
"(",
"final",
"PatchEntry",
"entry",
",",
"final",
"PatchContentLoader",
"loader",
")",
"{",
"final",
"List",
"<",
"ContentModification",
">",
"modifications",
"=",
"new",
"ArrayList",
"<",
"ContentModification",
">",
"(",
"entry",... | Undo changes for a single patch entry.
@param entry the patch entry
@param loader the content loader | [
"Undo",
"changes",
"for",
"a",
"single",
"patch",
"entry",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L488-L504 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.recordRollbackLoader | private void recordRollbackLoader(final String patchId, PatchableTarget.TargetInfo target) {
// setup the content loader paths
final DirectoryStructure structure = target.getDirectoryStructure();
final InstalledImage image = structure.getInstalledImage();
final File historyDir = image.ge... | java | private void recordRollbackLoader(final String patchId, PatchableTarget.TargetInfo target) {
// setup the content loader paths
final DirectoryStructure structure = target.getDirectoryStructure();
final InstalledImage image = structure.getInstalledImage();
final File historyDir = image.ge... | [
"private",
"void",
"recordRollbackLoader",
"(",
"final",
"String",
"patchId",
",",
"PatchableTarget",
".",
"TargetInfo",
"target",
")",
"{",
"// setup the content loader paths",
"final",
"DirectoryStructure",
"structure",
"=",
"target",
".",
"getDirectoryStructure",
"(",
... | Add a rollback loader for a give patch.
@param patchId the patch id.
@param target the patchable target
@throws XMLStreamException
@throws IOException | [
"Add",
"a",
"rollback",
"loader",
"for",
"a",
"give",
"patch",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L514-L525 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.recordContentLoader | protected void recordContentLoader(final String patchID, final PatchContentLoader contentLoader) {
if (contentLoaders.containsKey(patchID)) {
throw new IllegalStateException("Content loader already registered for patch " + patchID); // internal wrong usage, no i18n
}
contentLoaders.p... | java | protected void recordContentLoader(final String patchID, final PatchContentLoader contentLoader) {
if (contentLoaders.containsKey(patchID)) {
throw new IllegalStateException("Content loader already registered for patch " + patchID); // internal wrong usage, no i18n
}
contentLoaders.p... | [
"protected",
"void",
"recordContentLoader",
"(",
"final",
"String",
"patchID",
",",
"final",
"PatchContentLoader",
"contentLoader",
")",
"{",
"if",
"(",
"contentLoaders",
".",
"containsKey",
"(",
"patchID",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"... | Record a content loader for a given patch id.
@param patchID the patch id
@param contentLoader the content loader | [
"Record",
"a",
"content",
"loader",
"for",
"a",
"given",
"patch",
"id",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L533-L538 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.getTargetFile | public File getTargetFile(final MiscContentItem item) {
final State state = this.state;
if (state == State.NEW || state == State.ROLLBACK_ONLY) {
return getTargetFile(miscTargetRoot, item);
} else {
throw new IllegalStateException(); // internal wrong usage, no i18n
... | java | public File getTargetFile(final MiscContentItem item) {
final State state = this.state;
if (state == State.NEW || state == State.ROLLBACK_ONLY) {
return getTargetFile(miscTargetRoot, item);
} else {
throw new IllegalStateException(); // internal wrong usage, no i18n
... | [
"public",
"File",
"getTargetFile",
"(",
"final",
"MiscContentItem",
"item",
")",
"{",
"final",
"State",
"state",
"=",
"this",
".",
"state",
";",
"if",
"(",
"state",
"==",
"State",
".",
"NEW",
"||",
"state",
"==",
"State",
".",
"ROLLBACK_ONLY",
")",
"{",
... | Get the target file for misc items.
@param item the misc item
@return the target location | [
"Get",
"the",
"target",
"file",
"for",
"misc",
"items",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L566-L573 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.createProcessedPatch | protected Patch createProcessedPatch(final Patch original) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement element = createPatchElement(entry, entry.ele... | java | protected Patch createProcessedPatch(final Patch original) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement element = createPatchElement(entry, entry.ele... | [
"protected",
"Patch",
"createProcessedPatch",
"(",
"final",
"Patch",
"original",
")",
"{",
"// Process elements",
"final",
"List",
"<",
"PatchElement",
">",
"elements",
"=",
"new",
"ArrayList",
"<",
"PatchElement",
">",
"(",
")",
";",
"// Process layers",
"for",
... | Create a patch representing what we actually processed. This may contain some fixed content hashes for removed
modules.
@param original the original
@return the processed patch | [
"Create",
"a",
"patch",
"representing",
"what",
"we",
"actually",
"processed",
".",
"This",
"may",
"contain",
"some",
"fixed",
"content",
"hashes",
"for",
"removed",
"modules",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L582-L599 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.createRollbackPatch | protected RollbackPatch createRollbackPatch(final String patchId, final Patch.PatchType patchType) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement elemen... | java | protected RollbackPatch createRollbackPatch(final String patchId, final Patch.PatchType patchType) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement elemen... | [
"protected",
"RollbackPatch",
"createRollbackPatch",
"(",
"final",
"String",
"patchId",
",",
"final",
"Patch",
".",
"PatchType",
"patchType",
")",
"{",
"// Process elements",
"final",
"List",
"<",
"PatchElement",
">",
"elements",
"=",
"new",
"ArrayList",
"<",
"Pat... | Create a rollback patch based on the recorded actions.
@param patchId the new patch id, depending on release or one-off
@param patchType the current patch identity
@return the rollback patch | [
"Create",
"a",
"rollback",
"patch",
"based",
"on",
"the",
"recorded",
"actions",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L608-L634 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.getTargetFile | static File getTargetFile(final File root, final MiscContentItem item) {
return PatchContentLoader.getMiscPath(root, item);
} | java | static File getTargetFile(final File root, final MiscContentItem item) {
return PatchContentLoader.getMiscPath(root, item);
} | [
"static",
"File",
"getTargetFile",
"(",
"final",
"File",
"root",
",",
"final",
"MiscContentItem",
"item",
")",
"{",
"return",
"PatchContentLoader",
".",
"getMiscPath",
"(",
"root",
",",
"item",
")",
";",
"}"
] | Get a misc file.
@param root the root
@param item the misc content item
@return the misc file | [
"Get",
"a",
"misc",
"file",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L643-L645 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.createRollbackElement | protected static PatchElement createRollbackElement(final PatchEntry entry) {
final PatchElement patchElement = entry.element;
final String patchId;
final Patch.PatchType patchType = patchElement.getProvider().getPatchType();
if (patchType == Patch.PatchType.CUMULATIVE) {
pat... | java | protected static PatchElement createRollbackElement(final PatchEntry entry) {
final PatchElement patchElement = entry.element;
final String patchId;
final Patch.PatchType patchType = patchElement.getProvider().getPatchType();
if (patchType == Patch.PatchType.CUMULATIVE) {
pat... | [
"protected",
"static",
"PatchElement",
"createRollbackElement",
"(",
"final",
"PatchEntry",
"entry",
")",
"{",
"final",
"PatchElement",
"patchElement",
"=",
"entry",
".",
"element",
";",
"final",
"String",
"patchId",
";",
"final",
"Patch",
".",
"PatchType",
"patch... | Create a patch element for the rollback patch.
@param entry the entry
@return the new patch element | [
"Create",
"a",
"patch",
"element",
"for",
"the",
"rollback",
"patch",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L940-L950 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.createPatchElement | protected static PatchElement createPatchElement(final PatchEntry entry, String patchId, final List<ContentModification> modifications) {
final PatchElement patchElement = entry.element;
final PatchElementImpl element = new PatchElementImpl(patchId);
element.setProvider(patchElement.getProvider(... | java | protected static PatchElement createPatchElement(final PatchEntry entry, String patchId, final List<ContentModification> modifications) {
final PatchElement patchElement = entry.element;
final PatchElementImpl element = new PatchElementImpl(patchId);
element.setProvider(patchElement.getProvider(... | [
"protected",
"static",
"PatchElement",
"createPatchElement",
"(",
"final",
"PatchEntry",
"entry",
",",
"String",
"patchId",
",",
"final",
"List",
"<",
"ContentModification",
">",
"modifications",
")",
"{",
"final",
"PatchElement",
"patchElement",
"=",
"entry",
".",
... | Copy a patch element
@param entry the patch entry
@param patchId the patch id for the element
@param modifications the element modifications
@return the new patch element | [
"Copy",
"a",
"patch",
"element"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L960-L968 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.backupConfiguration | void backupConfiguration() throws IOException {
final String configuration = Constants.CONFIGURATION;
final File a = new File(installedImage.getAppClientDir(), configuration);
final File d = new File(installedImage.getDomainDir(), configuration);
final File s = new File(installedImage.... | java | void backupConfiguration() throws IOException {
final String configuration = Constants.CONFIGURATION;
final File a = new File(installedImage.getAppClientDir(), configuration);
final File d = new File(installedImage.getDomainDir(), configuration);
final File s = new File(installedImage.... | [
"void",
"backupConfiguration",
"(",
")",
"throws",
"IOException",
"{",
"final",
"String",
"configuration",
"=",
"Constants",
".",
"CONFIGURATION",
";",
"final",
"File",
"a",
"=",
"new",
"File",
"(",
"installedImage",
".",
"getAppClientDir",
"(",
")",
",",
"con... | Backup the current configuration as part of the patch history.
@throws IOException for any error | [
"Backup",
"the",
"current",
"configuration",
"as",
"part",
"of",
"the",
"patch",
"history",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L975-L996 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.backupDirectory | static void backupDirectory(final File source, final File target) throws IOException {
if (!target.exists()) {
if (!target.mkdirs()) {
throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath());
}
}
final File[] files = source.listFiles(... | java | static void backupDirectory(final File source, final File target) throws IOException {
if (!target.exists()) {
if (!target.mkdirs()) {
throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath());
}
}
final File[] files = source.listFiles(... | [
"static",
"void",
"backupDirectory",
"(",
"final",
"File",
"source",
",",
"final",
"File",
"target",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"target",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"!",
"target",
".",
"mkdirs",
"(",
")",
")... | Backup all xml files in a given directory.
@param source the source directory
@param target the target directory
@throws IOException for any error | [
"Backup",
"all",
"xml",
"files",
"in",
"a",
"given",
"directory",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L1013-L1024 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.writePatch | static void writePatch(final Patch rollbackPatch, final File file) throws IOException {
final File parent = file.getParentFile();
if (!parent.isDirectory()) {
if (!parent.mkdirs() && !parent.exists()) {
throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(file.getAbsolutePath(... | java | static void writePatch(final Patch rollbackPatch, final File file) throws IOException {
final File parent = file.getParentFile();
if (!parent.isDirectory()) {
if (!parent.mkdirs() && !parent.exists()) {
throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(file.getAbsolutePath(... | [
"static",
"void",
"writePatch",
"(",
"final",
"Patch",
"rollbackPatch",
",",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"final",
"File",
"parent",
"=",
"file",
".",
"getParentFile",
"(",
")",
";",
"if",
"(",
"!",
"parent",
".",
"isDirector... | Write the patch.xml
@param rollbackPatch the patch
@param file the target file
@throws IOException | [
"Write",
"the",
"patch",
".",
"xml"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L1073-L1087 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/CliCommandBuilder.java | CliCommandBuilder.setController | public CliCommandBuilder setController(final String hostname, final int port) {
setController(formatAddress(null, hostname, port));
return this;
} | java | public CliCommandBuilder setController(final String hostname, final int port) {
setController(formatAddress(null, hostname, port));
return this;
} | [
"public",
"CliCommandBuilder",
"setController",
"(",
"final",
"String",
"hostname",
",",
"final",
"int",
"port",
")",
"{",
"setController",
"(",
"formatAddress",
"(",
"null",
",",
"hostname",
",",
"port",
")",
")",
";",
"return",
"this",
";",
"}"
] | Sets the hostname and port to connect to.
@param hostname the host name
@param port the port
@return the builder | [
"Sets",
"the",
"hostname",
"and",
"port",
"to",
"connect",
"to",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/CliCommandBuilder.java#L199-L202 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/CliCommandBuilder.java | CliCommandBuilder.setController | public CliCommandBuilder setController(final String protocol, final String hostname, final int port) {
setController(formatAddress(protocol, hostname, port));
return this;
} | java | public CliCommandBuilder setController(final String protocol, final String hostname, final int port) {
setController(formatAddress(protocol, hostname, port));
return this;
} | [
"public",
"CliCommandBuilder",
"setController",
"(",
"final",
"String",
"protocol",
",",
"final",
"String",
"hostname",
",",
"final",
"int",
"port",
")",
"{",
"setController",
"(",
"formatAddress",
"(",
"protocol",
",",
"hostname",
",",
"port",
")",
")",
";",
... | Sets the protocol, hostname and port to connect to.
@param protocol the protocol to use
@param hostname the host name
@param port the port
@return the builder | [
"Sets",
"the",
"protocol",
"hostname",
"and",
"port",
"to",
"connect",
"to",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/CliCommandBuilder.java#L213-L216 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/CliCommandBuilder.java | CliCommandBuilder.setTimeout | public CliCommandBuilder setTimeout(final int timeout) {
if (timeout > 0) {
addCliArgument(CliArgument.TIMEOUT, Integer.toString(timeout));
} else {
addCliArgument(CliArgument.TIMEOUT, null);
}
return this;
} | java | public CliCommandBuilder setTimeout(final int timeout) {
if (timeout > 0) {
addCliArgument(CliArgument.TIMEOUT, Integer.toString(timeout));
} else {
addCliArgument(CliArgument.TIMEOUT, null);
}
return this;
} | [
"public",
"CliCommandBuilder",
"setTimeout",
"(",
"final",
"int",
"timeout",
")",
"{",
"if",
"(",
"timeout",
">",
"0",
")",
"{",
"addCliArgument",
"(",
"CliArgument",
".",
"TIMEOUT",
",",
"Integer",
".",
"toString",
"(",
"timeout",
")",
")",
";",
"}",
"e... | Sets the timeout used when connecting to the server.
@param timeout the time out to use
@return the builder | [
"Sets",
"the",
"timeout",
"used",
"when",
"connecting",
"to",
"the",
"server",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/CliCommandBuilder.java#L332-L339 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/Services.java | Services.addServerExecutorDependency | @Deprecated
public static <T> ServiceBuilder<T> addServerExecutorDependency(ServiceBuilder<T> builder, Injector<ExecutorService> injector) {
return builder.addDependency(ServerService.MANAGEMENT_EXECUTOR, ExecutorService.class, injector);
} | java | @Deprecated
public static <T> ServiceBuilder<T> addServerExecutorDependency(ServiceBuilder<T> builder, Injector<ExecutorService> injector) {
return builder.addDependency(ServerService.MANAGEMENT_EXECUTOR, ExecutorService.class, injector);
} | [
"@",
"Deprecated",
"public",
"static",
"<",
"T",
">",
"ServiceBuilder",
"<",
"T",
">",
"addServerExecutorDependency",
"(",
"ServiceBuilder",
"<",
"T",
">",
"builder",
",",
"Injector",
"<",
"ExecutorService",
">",
"injector",
")",
"{",
"return",
"builder",
".",... | Creates dependency on management executor.
@param builder the builder
@param injector the injector
@param <T> the parameter type
@return service builder instance
@deprecated Use {@link #requireServerExecutor(ServiceBuilder)} instead. This method will be removed in the future. | [
"Creates",
"dependency",
"on",
"management",
"executor",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/Services.java#L84-L87 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.handleChannelClosed | public void handleChannelClosed(final Channel closed, final IOException e) {
for(final ActiveOperationImpl<?, ?> activeOperation : activeRequests.values()) {
if (activeOperation.getChannel() == closed) {
// Only call cancel, to also interrupt still active threads
acti... | java | public void handleChannelClosed(final Channel closed, final IOException e) {
for(final ActiveOperationImpl<?, ?> activeOperation : activeRequests.values()) {
if (activeOperation.getChannel() == closed) {
// Only call cancel, to also interrupt still active threads
acti... | [
"public",
"void",
"handleChannelClosed",
"(",
"final",
"Channel",
"closed",
",",
"final",
"IOException",
"e",
")",
"{",
"for",
"(",
"final",
"ActiveOperationImpl",
"<",
"?",
",",
"?",
">",
"activeOperation",
":",
"activeRequests",
".",
"values",
"(",
")",
")... | Receive a notification that the channel was closed.
This is used for the {@link ManagementClientChannelStrategy.Establishing} since it might use multiple channels.
@param closed the closed resource
@param e the exception which occurred during close, if any | [
"Receive",
"a",
"notification",
"that",
"the",
"channel",
"was",
"closed",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L114-L121 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.awaitCompletion | @Override
public boolean awaitCompletion(long timeout, TimeUnit unit) throws InterruptedException {
long deadline = unit.toMillis(timeout) + System.currentTimeMillis();
lock.lock(); try {
assert shutdown;
while(activeCount != 0) {
long remaining = deadline - S... | java | @Override
public boolean awaitCompletion(long timeout, TimeUnit unit) throws InterruptedException {
long deadline = unit.toMillis(timeout) + System.currentTimeMillis();
lock.lock(); try {
assert shutdown;
while(activeCount != 0) {
long remaining = deadline - S... | [
"@",
"Override",
"public",
"boolean",
"awaitCompletion",
"(",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"long",
"deadline",
"=",
"unit",
".",
"toMillis",
"(",
"timeout",
")",
"+",
"System",
".",
"currentTimeMillis",
... | Await the completion of all currently active operations.
@param timeout the timeout
@param unit the time unit
@return {@code } false if the timeout was reached and there were still active operations
@throws InterruptedException | [
"Await",
"the",
"completion",
"of",
"all",
"currently",
"active",
"operations",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L161-L181 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.registerActiveOperation | protected <T, A> ActiveOperation<T, A> registerActiveOperation(final Integer id, A attachment, ActiveOperation.CompletedCallback<T> callback) {
lock.lock();
try {
// Check that we still allow registration
// TODO WFCORE-199 distinguish client uses from server uses and limit this ... | java | protected <T, A> ActiveOperation<T, A> registerActiveOperation(final Integer id, A attachment, ActiveOperation.CompletedCallback<T> callback) {
lock.lock();
try {
// Check that we still allow registration
// TODO WFCORE-199 distinguish client uses from server uses and limit this ... | [
"protected",
"<",
"T",
",",
"A",
">",
"ActiveOperation",
"<",
"T",
",",
"A",
">",
"registerActiveOperation",
"(",
"final",
"Integer",
"id",
",",
"A",
"attachment",
",",
"ActiveOperation",
".",
"CompletedCallback",
"<",
"T",
">",
"callback",
")",
"{",
"lock... | Register an active operation with a specific operation id.
@param id the operation id
@param attachment the shared attachment
@param callback the completed callback
@return the created active operation
@throws java.lang.IllegalStateException if an operation with the same id is already registered | [
"Register",
"an",
"active",
"operation",
"with",
"a",
"specific",
"operation",
"id",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L380-L410 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.getActiveOperation | protected <T, A> ActiveOperation<T, A> getActiveOperation(final ManagementRequestHeader header) {
return getActiveOperation(header.getBatchId());
} | java | protected <T, A> ActiveOperation<T, A> getActiveOperation(final ManagementRequestHeader header) {
return getActiveOperation(header.getBatchId());
} | [
"protected",
"<",
"T",
",",
"A",
">",
"ActiveOperation",
"<",
"T",
",",
"A",
">",
"getActiveOperation",
"(",
"final",
"ManagementRequestHeader",
"header",
")",
"{",
"return",
"getActiveOperation",
"(",
"header",
".",
"getBatchId",
"(",
")",
")",
";",
"}"
] | Get an active operation.
@param header the request header
@return the active operation, {@code null} if if there is no registered operation | [
"Get",
"an",
"active",
"operation",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L418-L420 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.getActiveOperation | protected <T, A> ActiveOperation<T, A> getActiveOperation(final Integer id) {
//noinspection unchecked
return (ActiveOperation<T, A>) activeRequests.get(id);
} | java | protected <T, A> ActiveOperation<T, A> getActiveOperation(final Integer id) {
//noinspection unchecked
return (ActiveOperation<T, A>) activeRequests.get(id);
} | [
"protected",
"<",
"T",
",",
"A",
">",
"ActiveOperation",
"<",
"T",
",",
"A",
">",
"getActiveOperation",
"(",
"final",
"Integer",
"id",
")",
"{",
"//noinspection unchecked",
"return",
"(",
"ActiveOperation",
"<",
"T",
",",
"A",
">",
")",
"activeRequests",
"... | Get the active operation.
@param id the active operation id
@return the active operation, {@code null} if if there is no registered operation | [
"Get",
"the",
"active",
"operation",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L428-L431 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.cancelAllActiveOperations | protected List<Integer> cancelAllActiveOperations() {
final List<Integer> operations = new ArrayList<Integer>();
for(final ActiveOperationImpl<?, ?> activeOperation : activeRequests.values()) {
activeOperation.asyncCancel(false);
operations.add(activeOperation.getOperationId());
... | java | protected List<Integer> cancelAllActiveOperations() {
final List<Integer> operations = new ArrayList<Integer>();
for(final ActiveOperationImpl<?, ?> activeOperation : activeRequests.values()) {
activeOperation.asyncCancel(false);
operations.add(activeOperation.getOperationId());
... | [
"protected",
"List",
"<",
"Integer",
">",
"cancelAllActiveOperations",
"(",
")",
"{",
"final",
"List",
"<",
"Integer",
">",
"operations",
"=",
"new",
"ArrayList",
"<",
"Integer",
">",
"(",
")",
";",
"for",
"(",
"final",
"ActiveOperationImpl",
"<",
"?",
","... | Cancel all currently active operations.
@return a list of cancelled operations | [
"Cancel",
"all",
"currently",
"active",
"operations",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L438-L445 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.removeActiveOperation | protected <T, A> ActiveOperation<T, A> removeActiveOperation(Integer id) {
final ActiveOperation<T, A> removed = removeUnderLock(id);
if(removed != null) {
for(final Map.Entry<Integer, ActiveRequest<?, ?>> requestEntry : requests.entrySet()) {
final ActiveRequest<?, ?> reques... | java | protected <T, A> ActiveOperation<T, A> removeActiveOperation(Integer id) {
final ActiveOperation<T, A> removed = removeUnderLock(id);
if(removed != null) {
for(final Map.Entry<Integer, ActiveRequest<?, ?>> requestEntry : requests.entrySet()) {
final ActiveRequest<?, ?> reques... | [
"protected",
"<",
"T",
",",
"A",
">",
"ActiveOperation",
"<",
"T",
",",
"A",
">",
"removeActiveOperation",
"(",
"Integer",
"id",
")",
"{",
"final",
"ActiveOperation",
"<",
"T",
",",
"A",
">",
"removed",
"=",
"removeUnderLock",
"(",
"id",
")",
";",
"if"... | Remove an active operation.
@param id the operation id
@return the removed active operation, {@code null} if there was no registered operation | [
"Remove",
"an",
"active",
"operation",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L453-L464 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.safeWriteErrorResponse | protected static void safeWriteErrorResponse(final Channel channel, final ManagementProtocolHeader header, final Throwable error) {
if(header.getType() == ManagementProtocol.TYPE_REQUEST) {
try {
writeErrorResponse(channel, (ManagementRequestHeader) header, error);
} catc... | java | protected static void safeWriteErrorResponse(final Channel channel, final ManagementProtocolHeader header, final Throwable error) {
if(header.getType() == ManagementProtocol.TYPE_REQUEST) {
try {
writeErrorResponse(channel, (ManagementRequestHeader) header, error);
} catc... | [
"protected",
"static",
"void",
"safeWriteErrorResponse",
"(",
"final",
"Channel",
"channel",
",",
"final",
"ManagementProtocolHeader",
"header",
",",
"final",
"Throwable",
"error",
")",
"{",
"if",
"(",
"header",
".",
"getType",
"(",
")",
"==",
"ManagementProtocol"... | Safe write error response.
@param channel the channel
@param header the request header
@param error the exception | [
"Safe",
"write",
"error",
"response",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L489-L497 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.writeErrorResponse | protected static void writeErrorResponse(final Channel channel, final ManagementRequestHeader header, final Throwable error) throws IOException {
final ManagementResponseHeader response = ManagementResponseHeader.create(header, error);
final MessageOutputStream output = channel.writeMessage();
t... | java | protected static void writeErrorResponse(final Channel channel, final ManagementRequestHeader header, final Throwable error) throws IOException {
final ManagementResponseHeader response = ManagementResponseHeader.create(header, error);
final MessageOutputStream output = channel.writeMessage();
t... | [
"protected",
"static",
"void",
"writeErrorResponse",
"(",
"final",
"Channel",
"channel",
",",
"final",
"ManagementRequestHeader",
"header",
",",
"final",
"Throwable",
"error",
")",
"throws",
"IOException",
"{",
"final",
"ManagementResponseHeader",
"response",
"=",
"Ma... | Write an error response.
@param channel the channel
@param header the request
@param error the error
@throws IOException | [
"Write",
"an",
"error",
"response",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L507-L516 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.writeHeader | protected static FlushableDataOutput writeHeader(final ManagementProtocolHeader header, final OutputStream os) throws IOException {
final FlushableDataOutput output = FlushableDataOutputImpl.create(os);
header.write(output);
return output;
} | java | protected static FlushableDataOutput writeHeader(final ManagementProtocolHeader header, final OutputStream os) throws IOException {
final FlushableDataOutput output = FlushableDataOutputImpl.create(os);
header.write(output);
return output;
} | [
"protected",
"static",
"FlushableDataOutput",
"writeHeader",
"(",
"final",
"ManagementProtocolHeader",
"header",
",",
"final",
"OutputStream",
"os",
")",
"throws",
"IOException",
"{",
"final",
"FlushableDataOutput",
"output",
"=",
"FlushableDataOutputImpl",
".",
"create",... | Write the management protocol header.
@param header the mgmt protocol header
@param os the output stream
@throws IOException | [
"Write",
"the",
"management",
"protocol",
"header",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L525-L529 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java | AbstractMessageHandler.getFallbackHandler | protected static <T, A> ManagementRequestHandler<T, A> getFallbackHandler(final ManagementRequestHeader header) {
return new ManagementRequestHandler<T, A>() {
@Override
public void handleRequest(final DataInput input, ActiveOperation.ResultHandler<T> resultHandler, ManagementRequestCont... | java | protected static <T, A> ManagementRequestHandler<T, A> getFallbackHandler(final ManagementRequestHeader header) {
return new ManagementRequestHandler<T, A>() {
@Override
public void handleRequest(final DataInput input, ActiveOperation.ResultHandler<T> resultHandler, ManagementRequestCont... | [
"protected",
"static",
"<",
"T",
",",
"A",
">",
"ManagementRequestHandler",
"<",
"T",
",",
"A",
">",
"getFallbackHandler",
"(",
"final",
"ManagementRequestHeader",
"header",
")",
"{",
"return",
"new",
"ManagementRequestHandler",
"<",
"T",
",",
"A",
">",
"(",
... | Get a fallback handler.
@param header the protocol header
@return the fallback handler | [
"Get",
"a",
"fallback",
"handler",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L537-L547 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java | PatchModuleInvalidationUtils.processFile | static void processFile(final IdentityPatchContext context, final File file, final PatchingTaskContext.Mode mode) throws IOException {
if (mode == PatchingTaskContext.Mode.APPLY) {
if (ENABLE_INVALIDATION) {
updateJar(file, GOOD_ENDSIG_PATTERN, BAD_BYTE_SKIP, CRIPPLED_ENDSIG, GOOD_EN... | java | static void processFile(final IdentityPatchContext context, final File file, final PatchingTaskContext.Mode mode) throws IOException {
if (mode == PatchingTaskContext.Mode.APPLY) {
if (ENABLE_INVALIDATION) {
updateJar(file, GOOD_ENDSIG_PATTERN, BAD_BYTE_SKIP, CRIPPLED_ENDSIG, GOOD_EN... | [
"static",
"void",
"processFile",
"(",
"final",
"IdentityPatchContext",
"context",
",",
"final",
"File",
"file",
",",
"final",
"PatchingTaskContext",
".",
"Mode",
"mode",
")",
"throws",
"IOException",
"{",
"if",
"(",
"mode",
"==",
"PatchingTaskContext",
".",
"Mod... | Process a file.
@param file the file to be processed
@param mode the patching mode
@throws IOException | [
"Process",
"a",
"file",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java#L150-L162 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java | PatchModuleInvalidationUtils.updateJar | private static void updateJar(final File file, final byte[] searchPattern, final int[] badSkipBytes, final int newSig, final int endSig) throws IOException {
final RandomAccessFile raf = new RandomAccessFile(file, "rw");
try {
final FileChannel channel = raf.getChannel();
try {
... | java | private static void updateJar(final File file, final byte[] searchPattern, final int[] badSkipBytes, final int newSig, final int endSig) throws IOException {
final RandomAccessFile raf = new RandomAccessFile(file, "rw");
try {
final FileChannel channel = raf.getChannel();
try {
... | [
"private",
"static",
"void",
"updateJar",
"(",
"final",
"File",
"file",
",",
"final",
"byte",
"[",
"]",
"searchPattern",
",",
"final",
"int",
"[",
"]",
"badSkipBytes",
",",
"final",
"int",
"newSig",
",",
"final",
"int",
"endSig",
")",
"throws",
"IOExceptio... | Update the central directory signature of a .jar.
@param file the file to process
@param searchPattern the search patter to use
@param badSkipBytes the bad bytes skip table
@param newSig the new signature
@param endSig the expected signature
@throws IOException | [
"Update",
"the",
"central",
"directory",
"signature",
"of",
"a",
".",
"jar",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java#L174-L214 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java | PatchModuleInvalidationUtils.validateEndRecord | private static boolean validateEndRecord(File file, FileChannel channel, long startEndRecord, long endSig) throws IOException {
try {
channel.position(startEndRecord);
final ByteBuffer endDirHeader = getByteBuffer(ENDLEN);
read(endDirHeader, channel);
if (endDir... | java | private static boolean validateEndRecord(File file, FileChannel channel, long startEndRecord, long endSig) throws IOException {
try {
channel.position(startEndRecord);
final ByteBuffer endDirHeader = getByteBuffer(ENDLEN);
read(endDirHeader, channel);
if (endDir... | [
"private",
"static",
"boolean",
"validateEndRecord",
"(",
"File",
"file",
",",
"FileChannel",
"channel",
",",
"long",
"startEndRecord",
",",
"long",
"endSig",
")",
"throws",
"IOException",
"{",
"try",
"{",
"channel",
".",
"position",
"(",
"startEndRecord",
")",
... | Validates that the data structure at position startEndRecord has a field in the expected position
that points to the start of the first central directory file, and, if so, that the file
has a complete end of central directory record comment at the end.
@param file the file being checked
@param channel ... | [
"Validates",
"that",
"the",
"data",
"structure",
"at",
"position",
"startEndRecord",
"has",
"a",
"field",
"in",
"the",
"expected",
"position",
"that",
"points",
"to",
"the",
"start",
"of",
"the",
"first",
"central",
"directory",
"file",
"and",
"if",
"so",
"t... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java#L257-L317 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java | PatchModuleInvalidationUtils.scanForEndSig | private static long scanForEndSig(final File file, final FileChannel channel, final ScanContext context) throws IOException {
// TODO Consider just reading in MAX_REVERSE_SCAN bytes -- increased peak memory cost but less complex
ByteBuffer bb = getByteBuffer(CHUNK_SIZE);
long start = channel... | java | private static long scanForEndSig(final File file, final FileChannel channel, final ScanContext context) throws IOException {
// TODO Consider just reading in MAX_REVERSE_SCAN bytes -- increased peak memory cost but less complex
ByteBuffer bb = getByteBuffer(CHUNK_SIZE);
long start = channel... | [
"private",
"static",
"long",
"scanForEndSig",
"(",
"final",
"File",
"file",
",",
"final",
"FileChannel",
"channel",
",",
"final",
"ScanContext",
"context",
")",
"throws",
"IOException",
"{",
"// TODO Consider just reading in MAX_REVERSE_SCAN bytes -- increased peak memory cos... | Boyer Moore scan that proceeds backwards from the end of the file looking for endsig
@param file the file being checked
@param channel the channel
@param context the scan context
@return
@throws IOException | [
"Boyer",
"Moore",
"scan",
"that",
"proceeds",
"backwards",
"from",
"the",
"end",
"of",
"the",
"file",
"looking",
"for",
"endsig"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java#L328-L399 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java | PatchModuleInvalidationUtils.scanForLocSig | private static long scanForLocSig(FileChannel channel) throws IOException {
channel.position(0);
ByteBuffer bb = getByteBuffer(CHUNK_SIZE);
long end = channel.size();
while (channel.position() <= end) {
read(bb, channel);
int bufferPos = 0;
while (... | java | private static long scanForLocSig(FileChannel channel) throws IOException {
channel.position(0);
ByteBuffer bb = getByteBuffer(CHUNK_SIZE);
long end = channel.size();
while (channel.position() <= end) {
read(bb, channel);
int bufferPos = 0;
while (... | [
"private",
"static",
"long",
"scanForLocSig",
"(",
"FileChannel",
"channel",
")",
"throws",
"IOException",
"{",
"channel",
".",
"position",
"(",
"0",
")",
";",
"ByteBuffer",
"bb",
"=",
"getByteBuffer",
"(",
"CHUNK_SIZE",
")",
";",
"long",
"end",
"=",
"channe... | Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG | [
"Boyer",
"Moore",
"scan",
"that",
"proceeds",
"forwards",
"from",
"the",
"end",
"of",
"the",
"file",
"looking",
"for",
"the",
"first",
"LOCSIG"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java#L404-L460 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java | PatchModuleInvalidationUtils.validateLocalFileRecord | private static boolean validateLocalFileRecord(FileChannel channel, long startLocRecord, long compressedSize) throws IOException {
ByteBuffer lfhBuffer = getByteBuffer(LOCLEN);
read(lfhBuffer, channel, startLocRecord);
if (lfhBuffer.limit() < LOCLEN || getUnsignedInt(lfhBuffer, 0) != LOCSIG) {
... | java | private static boolean validateLocalFileRecord(FileChannel channel, long startLocRecord, long compressedSize) throws IOException {
ByteBuffer lfhBuffer = getByteBuffer(LOCLEN);
read(lfhBuffer, channel, startLocRecord);
if (lfhBuffer.limit() < LOCLEN || getUnsignedInt(lfhBuffer, 0) != LOCSIG) {
... | [
"private",
"static",
"boolean",
"validateLocalFileRecord",
"(",
"FileChannel",
"channel",
",",
"long",
"startLocRecord",
",",
"long",
"compressedSize",
")",
"throws",
"IOException",
"{",
"ByteBuffer",
"lfhBuffer",
"=",
"getByteBuffer",
"(",
"LOCLEN",
")",
";",
"read... | Checks that the data starting at startLocRecord looks like a local file record header.
@param channel the channel
@param startLocRecord offset into channel of the start of the local record
@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known | [
"Checks",
"that",
"the",
"data",
"starting",
"at",
"startLocRecord",
"looks",
"like",
"a",
"local",
"file",
"record",
"header",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java#L469-L489 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java | PatchModuleInvalidationUtils.computeBadByteSkipArray | private static void computeBadByteSkipArray(byte[] pattern, int[] badByteArray) {
for (int a = 0; a < ALPHABET_SIZE; a++) {
badByteArray[a] = pattern.length;
}
for (int j = 0; j < pattern.length - 1; j++) {
badByteArray[pattern[j] - Byte.MIN_VALUE] = pattern.length - j -... | java | private static void computeBadByteSkipArray(byte[] pattern, int[] badByteArray) {
for (int a = 0; a < ALPHABET_SIZE; a++) {
badByteArray[a] = pattern.length;
}
for (int j = 0; j < pattern.length - 1; j++) {
badByteArray[pattern[j] - Byte.MIN_VALUE] = pattern.length - j -... | [
"private",
"static",
"void",
"computeBadByteSkipArray",
"(",
"byte",
"[",
"]",
"pattern",
",",
"int",
"[",
"]",
"badByteArray",
")",
"{",
"for",
"(",
"int",
"a",
"=",
"0",
";",
"a",
"<",
"ALPHABET_SIZE",
";",
"a",
"++",
")",
"{",
"badByteArray",
"[",
... | Fills the Boyer Moore "bad character array" for the given pattern | [
"Fills",
"the",
"Boyer",
"Moore",
"bad",
"character",
"array",
"for",
"the",
"given",
"pattern"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchModuleInvalidationUtils.java#L520-L528 | train |
wildfly/wildfly-core | embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java | EmbeddedProcessFactory.createHostController | public static HostController createHostController(String jbossHomePath, String modulePath, String[] systemPackages, String[] cmdargs) {
if (jbossHomePath == null || jbossHomePath.isEmpty()) {
throw EmbeddedLogger.ROOT_LOGGER.invalidJBossHome(jbossHomePath);
}
File jbossHomeDir = new ... | java | public static HostController createHostController(String jbossHomePath, String modulePath, String[] systemPackages, String[] cmdargs) {
if (jbossHomePath == null || jbossHomePath.isEmpty()) {
throw EmbeddedLogger.ROOT_LOGGER.invalidJBossHome(jbossHomePath);
}
File jbossHomeDir = new ... | [
"public",
"static",
"HostController",
"createHostController",
"(",
"String",
"jbossHomePath",
",",
"String",
"modulePath",
",",
"String",
"[",
"]",
"systemPackages",
",",
"String",
"[",
"]",
"cmdargs",
")",
"{",
"if",
"(",
"jbossHomePath",
"==",
"null",
"||",
... | Create an embedded host controller.
@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.
@param modulePath the location of the root of the module repository. May be {@code null} if the standard
location under {@code jbossHomePath} should be used
@param sys... | [
"Create",
"an",
"embedded",
"host",
"controller",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java#L206-L221 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/service/ServiceActivatorDependencyProcessor.java | ServiceActivatorDependencyProcessor.deploy | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final ResourceRoot deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT);
final ModuleSpecification moduleSpecification = phaseContext.getDeploymentUnit().getAttachme... | java | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final ResourceRoot deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT);
final ModuleSpecification moduleSpecification = phaseContext.getDeploymentUnit().getAttachme... | [
"public",
"void",
"deploy",
"(",
"DeploymentPhaseContext",
"phaseContext",
")",
"throws",
"DeploymentUnitProcessingException",
"{",
"final",
"ResourceRoot",
"deploymentRoot",
"=",
"phaseContext",
".",
"getDeploymentUnit",
"(",
")",
".",
"getAttachment",
"(",
"Attachments"... | Add the dependencies if the deployment contains a service activator loader entry.
@param phaseContext the deployment unit context
@throws DeploymentUnitProcessingException | [
"Add",
"the",
"dependencies",
"if",
"the",
"deployment",
"contains",
"a",
"service",
"activator",
"loader",
"entry",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/service/ServiceActivatorDependencyProcessor.java#L52-L62 | train |
wildfly/wildfly-core | request-controller/src/main/java/org/wildfly/extension/requestcontroller/ControlPoint.java | ControlPoint.pause | public void pause(ServerActivityCallback requestCountListener) {
if (paused) {
throw ServerLogger.ROOT_LOGGER.serverAlreadyPaused();
}
this.paused = true;
listenerUpdater.set(this, requestCountListener);
if (activeRequestCountUpdater.get(this) == 0) {
if (... | java | public void pause(ServerActivityCallback requestCountListener) {
if (paused) {
throw ServerLogger.ROOT_LOGGER.serverAlreadyPaused();
}
this.paused = true;
listenerUpdater.set(this, requestCountListener);
if (activeRequestCountUpdater.get(this) == 0) {
if (... | [
"public",
"void",
"pause",
"(",
"ServerActivityCallback",
"requestCountListener",
")",
"{",
"if",
"(",
"paused",
")",
"{",
"throw",
"ServerLogger",
".",
"ROOT_LOGGER",
".",
"serverAlreadyPaused",
"(",
")",
";",
"}",
"this",
".",
"paused",
"=",
"true",
";",
"... | Pause the current entry point, and invoke the provided listener when all current requests have finished.
If individual control point tracking is not enabled then the listener will be invoked straight away
@param requestCountListener The listener to invoke | [
"Pause",
"the",
"current",
"entry",
"point",
"and",
"invoke",
"the",
"provided",
"listener",
"when",
"all",
"current",
"requests",
"have",
"finished",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/request-controller/src/main/java/org/wildfly/extension/requestcontroller/ControlPoint.java#L95-L106 | train |
wildfly/wildfly-core | request-controller/src/main/java/org/wildfly/extension/requestcontroller/ControlPoint.java | ControlPoint.resume | public void resume() {
this.paused = false;
ServerActivityCallback listener = listenerUpdater.get(this);
if (listener != null) {
listenerUpdater.compareAndSet(this, listener, null);
}
} | java | public void resume() {
this.paused = false;
ServerActivityCallback listener = listenerUpdater.get(this);
if (listener != null) {
listenerUpdater.compareAndSet(this, listener, null);
}
} | [
"public",
"void",
"resume",
"(",
")",
"{",
"this",
".",
"paused",
"=",
"false",
";",
"ServerActivityCallback",
"listener",
"=",
"listenerUpdater",
".",
"get",
"(",
"this",
")",
";",
"if",
"(",
"listener",
"!=",
"null",
")",
"{",
"listenerUpdater",
".",
"... | Cancel the pause operation | [
"Cancel",
"the",
"pause",
"operation"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/request-controller/src/main/java/org/wildfly/extension/requestcontroller/ControlPoint.java#L111-L117 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/mgmt/HostInfo.java | HostInfo.createLocalHostHostInfo | public static ModelNode createLocalHostHostInfo(final LocalHostControllerInfo hostInfo, final ProductConfig productConfig,
final IgnoredDomainResourceRegistry ignoredResourceRegistry, final Resource hostModelResource) {
final ModelNode info = new ModelNode();
... | java | public static ModelNode createLocalHostHostInfo(final LocalHostControllerInfo hostInfo, final ProductConfig productConfig,
final IgnoredDomainResourceRegistry ignoredResourceRegistry, final Resource hostModelResource) {
final ModelNode info = new ModelNode();
... | [
"public",
"static",
"ModelNode",
"createLocalHostHostInfo",
"(",
"final",
"LocalHostControllerInfo",
"hostInfo",
",",
"final",
"ProductConfig",
"productConfig",
",",
"final",
"IgnoredDomainResourceRegistry",
"ignoredResourceRegistry",
",",
"final",
"Resource",
"hostModelResourc... | Create the metadata which gets send to the DC when registering.
@param hostInfo the local host info
@param productConfig the product config
@param ignoredResourceRegistry registry of ignored resources
@return the host info | [
"Create",
"the",
"metadata",
"which",
"gets",
"send",
"to",
"the",
"DC",
"when",
"registering",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/mgmt/HostInfo.java#L85-L109 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/Environment.java | Environment.addModuleDir | public void addModuleDir(final String moduleDir) {
if (moduleDir == null) {
throw LauncherMessages.MESSAGES.nullParam("moduleDir");
}
// Validate the path
final Path path = Paths.get(moduleDir).normalize();
modulesDirs.add(path.toString());
} | java | public void addModuleDir(final String moduleDir) {
if (moduleDir == null) {
throw LauncherMessages.MESSAGES.nullParam("moduleDir");
}
// Validate the path
final Path path = Paths.get(moduleDir).normalize();
modulesDirs.add(path.toString());
} | [
"public",
"void",
"addModuleDir",
"(",
"final",
"String",
"moduleDir",
")",
"{",
"if",
"(",
"moduleDir",
"==",
"null",
")",
"{",
"throw",
"LauncherMessages",
".",
"MESSAGES",
".",
"nullParam",
"(",
"\"moduleDir\"",
")",
";",
"}",
"// Validate the path",
"final... | Adds a directory to the collection of module paths.
@param moduleDir the module directory to add
@throws java.lang.IllegalArgumentException if the path is {@code null} | [
"Adds",
"a",
"directory",
"to",
"the",
"collection",
"of",
"module",
"paths",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/Environment.java#L93-L100 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/Environment.java | Environment.getModulePaths | public String getModulePaths() {
final StringBuilder result = new StringBuilder();
if (addDefaultModuleDir) {
result.append(wildflyHome.resolve("modules").toString());
}
if (!modulesDirs.isEmpty()) {
if (addDefaultModuleDir) result.append(File.pathSeparator);
... | java | public String getModulePaths() {
final StringBuilder result = new StringBuilder();
if (addDefaultModuleDir) {
result.append(wildflyHome.resolve("modules").toString());
}
if (!modulesDirs.isEmpty()) {
if (addDefaultModuleDir) result.append(File.pathSeparator);
... | [
"public",
"String",
"getModulePaths",
"(",
")",
"{",
"final",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"addDefaultModuleDir",
")",
"{",
"result",
".",
"append",
"(",
"wildflyHome",
".",
"resolve",
"(",
"\"modules\"",
... | Returns the modules paths used on the command line.
@return the paths separated by the {@link File#pathSeparator path separator} | [
"Returns",
"the",
"modules",
"paths",
"used",
"on",
"the",
"command",
"line",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/Environment.java#L171-L186 | train |
wildfly/wildfly-core | controller-client/src/main/java/org/jboss/as/controller/client/impl/ExistingChannelModelControllerClient.java | ExistingChannelModelControllerClient.createAndAdd | public static ModelControllerClient createAndAdd(final ManagementChannelHandler handler) {
final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler);
handler.addHandlerFactory(client);
return client;
} | java | public static ModelControllerClient createAndAdd(final ManagementChannelHandler handler) {
final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler);
handler.addHandlerFactory(client);
return client;
} | [
"public",
"static",
"ModelControllerClient",
"createAndAdd",
"(",
"final",
"ManagementChannelHandler",
"handler",
")",
"{",
"final",
"ExistingChannelModelControllerClient",
"client",
"=",
"new",
"ExistingChannelModelControllerClient",
"(",
"handler",
")",
";",
"handler",
".... | Create and add model controller handler to an existing management channel handler.
@param handler the channel handler
@return the created client | [
"Create",
"and",
"add",
"model",
"controller",
"handler",
"to",
"an",
"existing",
"management",
"channel",
"handler",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller-client/src/main/java/org/jboss/as/controller/client/impl/ExistingChannelModelControllerClient.java#L63-L67 | train |
wildfly/wildfly-core | controller-client/src/main/java/org/jboss/as/controller/client/impl/ExistingChannelModelControllerClient.java | ExistingChannelModelControllerClient.createReceiving | public static ModelControllerClient createReceiving(final Channel channel, final ExecutorService executorService) {
final ManagementClientChannelStrategy strategy = ManagementClientChannelStrategy.create(channel);
final ManagementChannelHandler handler = new ManagementChannelHandler(strategy, executorSe... | java | public static ModelControllerClient createReceiving(final Channel channel, final ExecutorService executorService) {
final ManagementClientChannelStrategy strategy = ManagementClientChannelStrategy.create(channel);
final ManagementChannelHandler handler = new ManagementChannelHandler(strategy, executorSe... | [
"public",
"static",
"ModelControllerClient",
"createReceiving",
"(",
"final",
"Channel",
"channel",
",",
"final",
"ExecutorService",
"executorService",
")",
"{",
"final",
"ManagementClientChannelStrategy",
"strategy",
"=",
"ManagementClientChannelStrategy",
".",
"create",
"... | Create a model controller client which is exclusively receiving messages on an existing channel.
@param channel the channel
@param executorService an executor
@return the created client | [
"Create",
"a",
"model",
"controller",
"client",
"which",
"is",
"exclusively",
"receiving",
"messages",
"on",
"an",
"existing",
"channel",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller-client/src/main/java/org/jboss/as/controller/client/impl/ExistingChannelModelControllerClient.java#L76-L96 | train |
wildfly/wildfly-core | domain-management/src/main/java/org/jboss/as/domain/management/security/UserPropertiesFileLoader.java | UserPropertiesFileLoader.addLineContent | @Override
protected void addLineContent(BufferedReader bufferedFileReader, List<String> content, String line) throws IOException {
// Is the line an empty comment "#" ?
if (line.startsWith(COMMENT_PREFIX) && line.length() == 1) {
String nextLine = bufferedFileReader.readLine();
... | java | @Override
protected void addLineContent(BufferedReader bufferedFileReader, List<String> content, String line) throws IOException {
// Is the line an empty comment "#" ?
if (line.startsWith(COMMENT_PREFIX) && line.length() == 1) {
String nextLine = bufferedFileReader.readLine();
... | [
"@",
"Override",
"protected",
"void",
"addLineContent",
"(",
"BufferedReader",
"bufferedFileReader",
",",
"List",
"<",
"String",
">",
"content",
",",
"String",
"line",
")",
"throws",
"IOException",
"{",
"// Is the line an empty comment \"#\" ?",
"if",
"(",
"line",
"... | Remove the realm name block.
@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String) | [
"Remove",
"the",
"realm",
"name",
"block",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/security/UserPropertiesFileLoader.java#L170-L193 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/OperationDefinition.java | OperationDefinition.validateOperation | @Deprecated
public void validateOperation(final ModelNode operation) throws OperationFailedException {
if (operation.hasDefined(ModelDescriptionConstants.OPERATION_NAME) && deprecationData != null && deprecationData.isNotificationUseful()) {
ControllerLogger.DEPRECATED_LOGGER.operationDeprecated... | java | @Deprecated
public void validateOperation(final ModelNode operation) throws OperationFailedException {
if (operation.hasDefined(ModelDescriptionConstants.OPERATION_NAME) && deprecationData != null && deprecationData.isNotificationUseful()) {
ControllerLogger.DEPRECATED_LOGGER.operationDeprecated... | [
"@",
"Deprecated",
"public",
"void",
"validateOperation",
"(",
"final",
"ModelNode",
"operation",
")",
"throws",
"OperationFailedException",
"{",
"if",
"(",
"operation",
".",
"hasDefined",
"(",
"ModelDescriptionConstants",
".",
"OPERATION_NAME",
")",
"&&",
"deprecatio... | Validates operation model against the definition and its parameters
@param operation model node of type {@link ModelType#OBJECT}, representing an operation request
@throws OperationFailedException if the value is not valid
@deprecated Not used by the WildFly management kernel; will be removed in a future release | [
"Validates",
"operation",
"model",
"against",
"the",
"definition",
"and",
"its",
"parameters"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/OperationDefinition.java#L172-L181 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/OperationDefinition.java | OperationDefinition.validateAndSet | @SuppressWarnings("deprecation")
@Deprecated
public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException {
validateOperation(operationObject);
for (AttributeDefinition ad : this.parameters) {
ad.validateAndSet(operationObject, mo... | java | @SuppressWarnings("deprecation")
@Deprecated
public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException {
validateOperation(operationObject);
for (AttributeDefinition ad : this.parameters) {
ad.validateAndSet(operationObject, mo... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"@",
"Deprecated",
"public",
"final",
"void",
"validateAndSet",
"(",
"ModelNode",
"operationObject",
",",
"final",
"ModelNode",
"model",
")",
"throws",
"OperationFailedException",
"{",
"validateOperation",
"(",
"op... | validates operation against the definition and sets model for the parameters passed.
@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request
@param model model node in which the value should be stored
@throws OperationFailedException if the value is not... | [
"validates",
"operation",
"against",
"the",
"definition",
"and",
"sets",
"model",
"for",
"the",
"parameters",
"passed",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/OperationDefinition.java#L192-L199 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/validation/BasicArtifactProcessor.java | BasicArtifactProcessor.getHandlerForArtifact | <P extends PatchingArtifact.ArtifactState, S extends PatchingArtifact.ArtifactState> PatchingArtifactStateHandler<S> getHandlerForArtifact(PatchingArtifact<P, S> artifact) {
return handlers.get(artifact);
} | java | <P extends PatchingArtifact.ArtifactState, S extends PatchingArtifact.ArtifactState> PatchingArtifactStateHandler<S> getHandlerForArtifact(PatchingArtifact<P, S> artifact) {
return handlers.get(artifact);
} | [
"<",
"P",
"extends",
"PatchingArtifact",
".",
"ArtifactState",
",",
"S",
"extends",
"PatchingArtifact",
".",
"ArtifactState",
">",
"PatchingArtifactStateHandler",
"<",
"S",
">",
"getHandlerForArtifact",
"(",
"PatchingArtifact",
"<",
"P",
",",
"S",
">",
"artifact",
... | Get a state handler for a given patching artifact.
@param artifact the patching artifact
@param <P>
@param <S>
@return the state handler, {@code null} if there is no handler registered for the given artifact | [
"Get",
"a",
"state",
"handler",
"for",
"a",
"given",
"patching",
"artifact",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/validation/BasicArtifactProcessor.java#L123-L125 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java | CapabilityResolutionContext.getAttachment | public <V> V getAttachment(final AttachmentKey<V> key) {
assert key != null;
return key.cast(contextAttachments.get(key));
} | java | public <V> V getAttachment(final AttachmentKey<V> key) {
assert key != null;
return key.cast(contextAttachments.get(key));
} | [
"public",
"<",
"V",
">",
"V",
"getAttachment",
"(",
"final",
"AttachmentKey",
"<",
"V",
">",
"key",
")",
"{",
"assert",
"key",
"!=",
"null",
";",
"return",
"key",
".",
"cast",
"(",
"contextAttachments",
".",
"get",
"(",
"key",
")",
")",
";",
"}"
] | Retrieves an object that has been attached to this context.
@param key the key to the attachment.
@param <V> the value type of the attachment.
@return the attachment if found otherwise {@code null}. | [
"Retrieves",
"an",
"object",
"that",
"has",
"been",
"attached",
"to",
"this",
"context",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java#L54-L57 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java | CapabilityResolutionContext.attach | public <V> V attach(final AttachmentKey<V> key, final V value) {
assert key != null;
return key.cast(contextAttachments.put(key, value));
} | java | public <V> V attach(final AttachmentKey<V> key, final V value) {
assert key != null;
return key.cast(contextAttachments.put(key, value));
} | [
"public",
"<",
"V",
">",
"V",
"attach",
"(",
"final",
"AttachmentKey",
"<",
"V",
">",
"key",
",",
"final",
"V",
"value",
")",
"{",
"assert",
"key",
"!=",
"null",
";",
"return",
"key",
".",
"cast",
"(",
"contextAttachments",
".",
"put",
"(",
"key",
... | Attaches an arbitrary object to this context.
@param key they attachment key used to ensure uniqueness and used for retrieval of the value.
@param value the value to store.
@param <V> the value type of the attachment.
@return the previous value associated with the key or {@code null} if there was no previous valu... | [
"Attaches",
"an",
"arbitrary",
"object",
"to",
"this",
"context",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java#L68-L71 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java | CapabilityResolutionContext.attachIfAbsent | public <V> V attachIfAbsent(final AttachmentKey<V> key, final V value) {
assert key != null;
return key.cast(contextAttachments.putIfAbsent(key, value));
} | java | public <V> V attachIfAbsent(final AttachmentKey<V> key, final V value) {
assert key != null;
return key.cast(contextAttachments.putIfAbsent(key, value));
} | [
"public",
"<",
"V",
">",
"V",
"attachIfAbsent",
"(",
"final",
"AttachmentKey",
"<",
"V",
">",
"key",
",",
"final",
"V",
"value",
")",
"{",
"assert",
"key",
"!=",
"null",
";",
"return",
"key",
".",
"cast",
"(",
"contextAttachments",
".",
"putIfAbsent",
... | Attaches an arbitrary object to this context only if the object was not already attached. If a value has already
been attached with the key provided, the current value associated with the key is returned.
@param key they attachment key used to ensure uniqueness and used for retrieval of the value.
@param value the v... | [
"Attaches",
"an",
"arbitrary",
"object",
"to",
"this",
"context",
"only",
"if",
"the",
"object",
"was",
"not",
"already",
"attached",
".",
"If",
"a",
"value",
"has",
"already",
"been",
"attached",
"with",
"the",
"key",
"provided",
"the",
"current",
"value",
... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java#L83-L86 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java | CapabilityResolutionContext.detach | public <V> V detach(final AttachmentKey<V> key) {
assert key != null;
return key.cast(contextAttachments.remove(key));
} | java | public <V> V detach(final AttachmentKey<V> key) {
assert key != null;
return key.cast(contextAttachments.remove(key));
} | [
"public",
"<",
"V",
">",
"V",
"detach",
"(",
"final",
"AttachmentKey",
"<",
"V",
">",
"key",
")",
"{",
"assert",
"key",
"!=",
"null",
";",
"return",
"key",
".",
"cast",
"(",
"contextAttachments",
".",
"remove",
"(",
"key",
")",
")",
";",
"}"
] | Detaches or removes the value from this context.
@param key the key to the attachment.
@param <V> the value type of the attachment.
@return the attachment if found otherwise {@code null}. | [
"Detaches",
"or",
"removes",
"the",
"value",
"from",
"this",
"context",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/capability/registry/CapabilityResolutionContext.java#L96-L99 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/parsing/InterfacesXml.java | InterfacesXml.writeInterfaceCriteria | private void writeInterfaceCriteria(final XMLExtendedStreamWriter writer, final ModelNode subModel, final boolean nested) throws XMLStreamException {
for (final Property property : subModel.asPropertyList()) {
if (property.getValue().isDefined()) {
writeInterfaceCriteria(writer, prop... | java | private void writeInterfaceCriteria(final XMLExtendedStreamWriter writer, final ModelNode subModel, final boolean nested) throws XMLStreamException {
for (final Property property : subModel.asPropertyList()) {
if (property.getValue().isDefined()) {
writeInterfaceCriteria(writer, prop... | [
"private",
"void",
"writeInterfaceCriteria",
"(",
"final",
"XMLExtendedStreamWriter",
"writer",
",",
"final",
"ModelNode",
"subModel",
",",
"final",
"boolean",
"nested",
")",
"throws",
"XMLStreamException",
"{",
"for",
"(",
"final",
"Property",
"property",
":",
"sub... | Write the criteria elements, extracting the information of the sub-model.
@param writer the xml stream writer
@param subModel the interface model
@param nested whether it the criteria elements are nested as part of <not /> or <any />
@throws XMLStreamException | [
"Write",
"the",
"criteria",
"elements",
"extracting",
"the",
"information",
"of",
"the",
"sub",
"-",
"model",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/parsing/InterfacesXml.java#L280-L286 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/ConfigurationPersisterFactory.java | ConfigurationPersisterFactory.createHostXmlConfigurationPersister | public static ExtensibleConfigurationPersister createHostXmlConfigurationPersister(final ConfigurationFile file, final HostControllerEnvironment environment,
final ExecutorService executorService, final ExtensionRegistry hostExtensio... | java | public static ExtensibleConfigurationPersister createHostXmlConfigurationPersister(final ConfigurationFile file, final HostControllerEnvironment environment,
final ExecutorService executorService, final ExtensionRegistry hostExtensio... | [
"public",
"static",
"ExtensibleConfigurationPersister",
"createHostXmlConfigurationPersister",
"(",
"final",
"ConfigurationFile",
"file",
",",
"final",
"HostControllerEnvironment",
"environment",
",",
"final",
"ExecutorService",
"executorService",
",",
"final",
"ExtensionRegistry... | host.xml | [
"host",
".",
"xml"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/ConfigurationPersisterFactory.java#L67-L86 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/ConfigurationPersisterFactory.java | ConfigurationPersisterFactory.createDomainXmlConfigurationPersister | public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister(final ConfigurationFile file, ExecutorService executorService, ExtensionRegistry extensionRegistry, final HostControllerEnvironment environment) {
DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorServic... | java | public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister(final ConfigurationFile file, ExecutorService executorService, ExtensionRegistry extensionRegistry, final HostControllerEnvironment environment) {
DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorServic... | [
"public",
"static",
"ExtensibleConfigurationPersister",
"createDomainXmlConfigurationPersister",
"(",
"final",
"ConfigurationFile",
"file",
",",
"ExecutorService",
"executorService",
",",
"ExtensionRegistry",
"extensionRegistry",
",",
"final",
"HostControllerEnvironment",
"environm... | domain.xml | [
"domain",
".",
"xml"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/ConfigurationPersisterFactory.java#L89-L112 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/ConfigurationPersisterFactory.java | ConfigurationPersisterFactory.createTransientDomainXmlConfigurationPersister | public static ExtensibleConfigurationPersister createTransientDomainXmlConfigurationPersister(ExecutorService executorService, ExtensionRegistry extensionRegistry) {
DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry);
ExtensibleConfigurationPersister pe... | java | public static ExtensibleConfigurationPersister createTransientDomainXmlConfigurationPersister(ExecutorService executorService, ExtensionRegistry extensionRegistry) {
DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry);
ExtensibleConfigurationPersister pe... | [
"public",
"static",
"ExtensibleConfigurationPersister",
"createTransientDomainXmlConfigurationPersister",
"(",
"ExecutorService",
"executorService",
",",
"ExtensionRegistry",
"extensionRegistry",
")",
"{",
"DomainXml",
"domainXml",
"=",
"new",
"DomainXml",
"(",
"Module",
".",
... | slave=true | [
"slave",
"=",
"true"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/ConfigurationPersisterFactory.java#L135-L140 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchingTasks.java | PatchingTasks.apply | static void apply(final String patchId, final Collection<ContentModification> modifications, final PatchEntry patchEntry, final ContentItemFilter filter) {
for (final ContentModification modification : modifications) {
final ContentItem item = modification.getItem();
// Check if we acce... | java | static void apply(final String patchId, final Collection<ContentModification> modifications, final PatchEntry patchEntry, final ContentItemFilter filter) {
for (final ContentModification modification : modifications) {
final ContentItem item = modification.getItem();
// Check if we acce... | [
"static",
"void",
"apply",
"(",
"final",
"String",
"patchId",
",",
"final",
"Collection",
"<",
"ContentModification",
">",
"modifications",
",",
"final",
"PatchEntry",
"patchEntry",
",",
"final",
"ContentItemFilter",
"filter",
")",
"{",
"for",
"(",
"final",
"Con... | Apply modifications to a content task definition.
@param patchId the patch id
@param modifications the modifications
@param definitions the task definitions
@param filter the content item filter | [
"Apply",
"modifications",
"to",
"a",
"content",
"task",
"definition",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchingTasks.java#L165-L184 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/ServiceRemoveStepHandler.java | ServiceRemoveStepHandler.serviceName | protected ServiceName serviceName(final String name) {
return baseServiceName != null ? baseServiceName.append(name) : null;
} | java | protected ServiceName serviceName(final String name) {
return baseServiceName != null ? baseServiceName.append(name) : null;
} | [
"protected",
"ServiceName",
"serviceName",
"(",
"final",
"String",
"name",
")",
"{",
"return",
"baseServiceName",
"!=",
"null",
"?",
"baseServiceName",
".",
"append",
"(",
"name",
")",
":",
"null",
";",
"}"
] | The service name to be removed. Can be overridden for unusual service naming patterns
@param name The name of the resource being removed
@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}
passed to the constructor are to be performed | [
"The",
"service",
"name",
"to",
"be",
"removed",
".",
"Can",
"be",
"overridden",
"for",
"unusual",
"service",
"naming",
"patterns"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/ServiceRemoveStepHandler.java#L152-L154 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/handlers/ModuleNameTabCompleter.java | ModuleNameTabCompleter.subModuleExists | private boolean subModuleExists(File dir) {
if (isSlotDirectory(dir)) {
return true;
} else {
File[] children = dir.listFiles(File::isDirectory);
for (File child : children) {
if (subModuleExists(child)) {
return true;
... | java | private boolean subModuleExists(File dir) {
if (isSlotDirectory(dir)) {
return true;
} else {
File[] children = dir.listFiles(File::isDirectory);
for (File child : children) {
if (subModuleExists(child)) {
return true;
... | [
"private",
"boolean",
"subModuleExists",
"(",
"File",
"dir",
")",
"{",
"if",
"(",
"isSlotDirectory",
"(",
"dir",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"File",
"[",
"]",
"children",
"=",
"dir",
".",
"listFiles",
"(",
"File",
"::",
"i... | depth- first search for any module - just to check that the suggestion has any chance of delivering correct result | [
"depth",
"-",
"first",
"search",
"for",
"any",
"module",
"-",
"just",
"to",
"check",
"that",
"the",
"suggestion",
"has",
"any",
"chance",
"of",
"delivering",
"correct",
"result"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/handlers/ModuleNameTabCompleter.java#L169-L182 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/handlers/ModuleNameTabCompleter.java | ModuleNameTabCompleter.tail | private String tail(String moduleName) {
if (moduleName.indexOf(MODULE_NAME_SEPARATOR) > 0) {
return moduleName.substring(moduleName.indexOf(MODULE_NAME_SEPARATOR) + 1);
} else {
return "";
}
} | java | private String tail(String moduleName) {
if (moduleName.indexOf(MODULE_NAME_SEPARATOR) > 0) {
return moduleName.substring(moduleName.indexOf(MODULE_NAME_SEPARATOR) + 1);
} else {
return "";
}
} | [
"private",
"String",
"tail",
"(",
"String",
"moduleName",
")",
"{",
"if",
"(",
"moduleName",
".",
"indexOf",
"(",
"MODULE_NAME_SEPARATOR",
")",
">",
"0",
")",
"{",
"return",
"moduleName",
".",
"substring",
"(",
"moduleName",
".",
"indexOf",
"(",
"MODULE_NAME... | get all parts of module name apart from first | [
"get",
"all",
"parts",
"of",
"module",
"name",
"apart",
"from",
"first"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/handlers/ModuleNameTabCompleter.java#L210-L216 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/mgmt/domain/HostControllerClient.java | HostControllerClient.resolveBootUpdates | void resolveBootUpdates(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception {
connection.openConnection(controller, callback);
// Keep a reference to the the controller
this.controller = controller;
} | java | void resolveBootUpdates(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception {
connection.openConnection(controller, callback);
// Keep a reference to the the controller
this.controller = controller;
} | [
"void",
"resolveBootUpdates",
"(",
"final",
"ModelController",
"controller",
",",
"final",
"ActiveOperation",
".",
"CompletedCallback",
"<",
"ModelNode",
">",
"callback",
")",
"throws",
"Exception",
"{",
"connection",
".",
"openConnection",
"(",
"controller",
",",
"... | Resolve the boot updates and register at the local HC.
@param controller the model controller
@param callback the completed callback
@throws Exception for any error | [
"Resolve",
"the",
"boot",
"updates",
"and",
"register",
"at",
"the",
"local",
"HC",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/mgmt/domain/HostControllerClient.java#L111-L115 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/impl/VaultConfig.java | VaultConfig.loadExternalFile | static VaultConfig loadExternalFile(File f) throws XMLStreamException {
if(f == null) {
throw new IllegalArgumentException("File is null");
}
if(!f.exists()) {
throw new XMLStreamException("Failed to locate vault file " + f.getAbsolutePath());
}
final Vau... | java | static VaultConfig loadExternalFile(File f) throws XMLStreamException {
if(f == null) {
throw new IllegalArgumentException("File is null");
}
if(!f.exists()) {
throw new XMLStreamException("Failed to locate vault file " + f.getAbsolutePath());
}
final Vau... | [
"static",
"VaultConfig",
"loadExternalFile",
"(",
"File",
"f",
")",
"throws",
"XMLStreamException",
"{",
"if",
"(",
"f",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"File is null\"",
")",
";",
"}",
"if",
"(",
"!",
"f",
".",
"... | In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.
@param f the file containing the external vault configuration as generated by the vault tool
@return the vault config | [
"In",
"the",
"2",
".",
"0",
"xsd",
"the",
"vault",
"is",
"in",
"an",
"external",
"file",
"which",
"has",
"no",
"namespace",
"using",
"the",
"output",
"of",
"the",
"vault",
"tool",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/impl/VaultConfig.java#L68-L95 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/impl/VaultConfig.java | VaultConfig.readVaultElement_3_0 | static VaultConfig readVaultElement_3_0(XMLExtendedStreamReader reader, Namespace expectedNs) throws XMLStreamException {
final VaultConfig config = new VaultConfig();
final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttr... | java | static VaultConfig readVaultElement_3_0(XMLExtendedStreamReader reader, Namespace expectedNs) throws XMLStreamException {
final VaultConfig config = new VaultConfig();
final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttr... | [
"static",
"VaultConfig",
"readVaultElement_3_0",
"(",
"XMLExtendedStreamReader",
"reader",
",",
"Namespace",
"expectedNs",
")",
"throws",
"XMLStreamException",
"{",
"final",
"VaultConfig",
"config",
"=",
"new",
"VaultConfig",
"(",
")",
";",
"final",
"int",
"count",
... | In the 3.0 xsd the vault configuration and its options are part of the vault xsd.
@param reader the reader at the vault element
@param expectedNs the namespace
@return the vault configuration | [
"In",
"the",
"3",
".",
"0",
"xsd",
"the",
"vault",
"configuration",
"and",
"its",
"options",
"are",
"part",
"of",
"the",
"vault",
"xsd",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/impl/VaultConfig.java#L104-L125 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.