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-scanner/src/main/java/org/jboss/as/server/deployment/scanner/DeploymentScannerService.java | DeploymentScannerService.addService | public static ServiceController<DeploymentScanner> addService(final OperationContext context, final PathAddress resourceAddress, final String relativeTo, final String path,
final int scanInterval, TimeUnit unit, final boolean autoDeployZip,
... | java | public static ServiceController<DeploymentScanner> addService(final OperationContext context, final PathAddress resourceAddress, final String relativeTo, final String path,
final int scanInterval, TimeUnit unit, final boolean autoDeployZip,
... | [
"public",
"static",
"ServiceController",
"<",
"DeploymentScanner",
">",
"addService",
"(",
"final",
"OperationContext",
"context",
",",
"final",
"PathAddress",
"resourceAddress",
",",
"final",
"String",
"relativeTo",
",",
"final",
"String",
"path",
",",
"final",
"in... | Add the deployment scanner service to a batch.
@param context context for the operation that is adding this service
@param resourceAddress the address of the resource that manages the service
@param relativeTo the relative to
@param path the path
@param scanInterval the scan interv... | [
"Add",
"the",
"deployment",
"scanner",
"service",
"to",
"a",
"batch",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/deployment-scanner/src/main/java/org/jboss/as/server/deployment/scanner/DeploymentScannerService.java#L129-L146 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/gui/ManagementModel.java | ManagementModel.findNode | public ManagementModelNode findNode(String address) {
ManagementModelNode root = (ManagementModelNode)tree.getModel().getRoot();
Enumeration<javax.swing.tree.TreeNode> allNodes = root.depthFirstEnumeration();
while (allNodes.hasMoreElements()) {
ManagementModelNode node = (Management... | java | public ManagementModelNode findNode(String address) {
ManagementModelNode root = (ManagementModelNode)tree.getModel().getRoot();
Enumeration<javax.swing.tree.TreeNode> allNodes = root.depthFirstEnumeration();
while (allNodes.hasMoreElements()) {
ManagementModelNode node = (Management... | [
"public",
"ManagementModelNode",
"findNode",
"(",
"String",
"address",
")",
"{",
"ManagementModelNode",
"root",
"=",
"(",
"ManagementModelNode",
")",
"tree",
".",
"getModel",
"(",
")",
".",
"getRoot",
"(",
")",
";",
"Enumeration",
"<",
"javax",
".",
"swing",
... | Find a node in the tree. The node must be "visible" to be found.
@param address The full address of the node matching ManagementModelNode.addressPath()
@return The node, or null if not found. | [
"Find",
"a",
"node",
"in",
"the",
"tree",
".",
"The",
"node",
"must",
"be",
"visible",
"to",
"be",
"found",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/gui/ManagementModel.java#L83-L92 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/gui/ManagementModel.java | ManagementModel.getSelectedNode | public ManagementModelNode getSelectedNode() {
if (tree.getSelectionPath() == null) return null;
return (ManagementModelNode)tree.getSelectionPath().getLastPathComponent();
} | java | public ManagementModelNode getSelectedNode() {
if (tree.getSelectionPath() == null) return null;
return (ManagementModelNode)tree.getSelectionPath().getLastPathComponent();
} | [
"public",
"ManagementModelNode",
"getSelectedNode",
"(",
")",
"{",
"if",
"(",
"tree",
".",
"getSelectionPath",
"(",
")",
"==",
"null",
")",
"return",
"null",
";",
"return",
"(",
"ManagementModelNode",
")",
"tree",
".",
"getSelectionPath",
"(",
")",
".",
"get... | Get the node that has been selected by the user, or null if
nothing is selected.
@return The node or <code>null</code> | [
"Get",
"the",
"node",
"that",
"has",
"been",
"selected",
"by",
"the",
"user",
"or",
"null",
"if",
"nothing",
"is",
"selected",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/gui/ManagementModel.java#L134-L137 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/ProtocolConnectionUtils.java | ProtocolConnectionUtils.connectSync | public static Connection connectSync(final ProtocolConnectionConfiguration configuration) throws IOException {
long timeoutMillis = configuration.getConnectionTimeout();
CallbackHandler handler = configuration.getCallbackHandler();
final CallbackHandler actualHandler;
ProtocolTimeoutHand... | java | public static Connection connectSync(final ProtocolConnectionConfiguration configuration) throws IOException {
long timeoutMillis = configuration.getConnectionTimeout();
CallbackHandler handler = configuration.getCallbackHandler();
final CallbackHandler actualHandler;
ProtocolTimeoutHand... | [
"public",
"static",
"Connection",
"connectSync",
"(",
"final",
"ProtocolConnectionConfiguration",
"configuration",
")",
"throws",
"IOException",
"{",
"long",
"timeoutMillis",
"=",
"configuration",
".",
"getConnectionTimeout",
"(",
")",
";",
"CallbackHandler",
"handler",
... | Connect sync.
@param configuration the protocol configuration
@return the connection
@throws IOException | [
"Connect",
"sync",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/ProtocolConnectionUtils.java#L105-L131 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/impl/ReadlineConsole.java | CLITerminalConnection.openBlockingInterruptable | public void openBlockingInterruptable()
throws InterruptedException {
// We need to thread this call in order to interrupt it (when Ctrl-C occurs).
connectionThread = new Thread(() -> {
// This thread can't be interrupted from another thread.
// Wi... | java | public void openBlockingInterruptable()
throws InterruptedException {
// We need to thread this call in order to interrupt it (when Ctrl-C occurs).
connectionThread = new Thread(() -> {
// This thread can't be interrupted from another thread.
// Wi... | [
"public",
"void",
"openBlockingInterruptable",
"(",
")",
"throws",
"InterruptedException",
"{",
"// We need to thread this call in order to interrupt it (when Ctrl-C occurs).",
"connectionThread",
"=",
"new",
"Thread",
"(",
"(",
")",
"->",
"{",
"// This thread can't be interrupte... | Required to close the connection reading on the terminal, otherwise
it can't be interrupted.
@throws InterruptedException | [
"Required",
"to",
"close",
"the",
"connection",
"reading",
"on",
"the",
"terminal",
"otherwise",
"it",
"can",
"t",
"be",
"interrupted",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/impl/ReadlineConsole.java#L186-L203 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/ManagementProtocolHeader.java | ManagementProtocolHeader.validateSignature | protected static void validateSignature(final DataInput input) throws IOException {
final byte[] signatureBytes = new byte[4];
input.readFully(signatureBytes);
if (!Arrays.equals(ManagementProtocol.SIGNATURE, signatureBytes)) {
throw ProtocolLogger.ROOT_LOGGER.invalidSignature(Arrays... | java | protected static void validateSignature(final DataInput input) throws IOException {
final byte[] signatureBytes = new byte[4];
input.readFully(signatureBytes);
if (!Arrays.equals(ManagementProtocol.SIGNATURE, signatureBytes)) {
throw ProtocolLogger.ROOT_LOGGER.invalidSignature(Arrays... | [
"protected",
"static",
"void",
"validateSignature",
"(",
"final",
"DataInput",
"input",
")",
"throws",
"IOException",
"{",
"final",
"byte",
"[",
"]",
"signatureBytes",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"input",
".",
"readFully",
"(",
"signatureBytes",
... | Validate the header signature.
@param input The input to read the signature from
@throws IOException If any read problems occur | [
"Validate",
"the",
"header",
"signature",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/ManagementProtocolHeader.java#L90-L96 | train |
wildfly/wildfly-core | protocol/src/main/java/org/jboss/as/protocol/mgmt/ManagementProtocolHeader.java | ManagementProtocolHeader.parse | public static ManagementProtocolHeader parse(DataInput input) throws IOException {
validateSignature(input);
expectHeader(input, ManagementProtocol.VERSION_FIELD);
int version = input.readInt();
expectHeader(input, ManagementProtocol.TYPE);
byte type = input.readByte();
s... | java | public static ManagementProtocolHeader parse(DataInput input) throws IOException {
validateSignature(input);
expectHeader(input, ManagementProtocol.VERSION_FIELD);
int version = input.readInt();
expectHeader(input, ManagementProtocol.TYPE);
byte type = input.readByte();
s... | [
"public",
"static",
"ManagementProtocolHeader",
"parse",
"(",
"DataInput",
"input",
")",
"throws",
"IOException",
"{",
"validateSignature",
"(",
"input",
")",
";",
"expectHeader",
"(",
"input",
",",
"ManagementProtocol",
".",
"VERSION_FIELD",
")",
";",
"int",
"ver... | Parses the input stream to read the header
@param input data input to read from
@return the parsed protocol header
@throws IOException | [
"Parses",
"the",
"input",
"stream",
"to",
"read",
"the",
"header"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/ManagementProtocolHeader.java#L109-L129 | train |
wildfly/wildfly-core | domain-management/src/main/java/org/jboss/as/domain/management/security/password/simple/SimplePasswordStrengthChecker.java | SimplePasswordStrengthChecker.checkConsecutiveAlpha | protected void checkConsecutiveAlpha() {
Pattern symbolsPatter = Pattern.compile(REGEX_ALPHA_UC + "+");
Matcher matcher = symbolsPatter.matcher(this.password);
int met = 0;
while (matcher.find()) {
int start = matcher.start();
int end = matcher.end();
... | java | protected void checkConsecutiveAlpha() {
Pattern symbolsPatter = Pattern.compile(REGEX_ALPHA_UC + "+");
Matcher matcher = symbolsPatter.matcher(this.password);
int met = 0;
while (matcher.find()) {
int start = matcher.start();
int end = matcher.end();
... | [
"protected",
"void",
"checkConsecutiveAlpha",
"(",
")",
"{",
"Pattern",
"symbolsPatter",
"=",
"Pattern",
".",
"compile",
"(",
"REGEX_ALPHA_UC",
"+",
"\"+\"",
")",
";",
"Matcher",
"matcher",
"=",
"symbolsPatter",
".",
"matcher",
"(",
"this",
".",
"password",
")... | those could be incorporated with above, but that would blurry everything. | [
"those",
"could",
"be",
"incorporated",
"with",
"above",
"but",
"that",
"would",
"blurry",
"everything",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/security/password/simple/SimplePasswordStrengthChecker.java#L289-L328 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/ManagedServerOperationsFactory.java | ManagedServerOperationsFactory.createBootUpdates | public static ModelNode createBootUpdates(final String serverName, final ModelNode domainModel, final ModelNode hostModel,
final DomainController domainController, final ExpressionResolver expressionResolver) {
final ManagedServerOperationsFactory factory = new Mana... | java | public static ModelNode createBootUpdates(final String serverName, final ModelNode domainModel, final ModelNode hostModel,
final DomainController domainController, final ExpressionResolver expressionResolver) {
final ManagedServerOperationsFactory factory = new Mana... | [
"public",
"static",
"ModelNode",
"createBootUpdates",
"(",
"final",
"String",
"serverName",
",",
"final",
"ModelNode",
"domainModel",
",",
"final",
"ModelNode",
"hostModel",
",",
"final",
"DomainController",
"domainController",
",",
"final",
"ExpressionResolver",
"expre... | Create a list of operations required to a boot a managed server.
@param serverName the server name
@param domainModel the complete domain model
@param hostModel the local host model
@param domainController the domain controller
@return the list of boot operations | [
"Create",
"a",
"list",
"of",
"operations",
"required",
"to",
"a",
"boot",
"a",
"managed",
"server",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/ManagedServerOperationsFactory.java#L180-L187 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/HostServerGroupTracker.java | HostServerGroupTracker.getMappableDomainEffect | private synchronized HostServerGroupEffect getMappableDomainEffect(PathAddress address, String key,
Map<String, Set<String>> map, Resource root) {
if (requiresMapping) {
map(root);
requiresMapping = false;
}
... | java | private synchronized HostServerGroupEffect getMappableDomainEffect(PathAddress address, String key,
Map<String, Set<String>> map, Resource root) {
if (requiresMapping) {
map(root);
requiresMapping = false;
}
... | [
"private",
"synchronized",
"HostServerGroupEffect",
"getMappableDomainEffect",
"(",
"PathAddress",
"address",
",",
"String",
"key",
",",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"map",
",",
"Resource",
"root",
")",
"{",
"if",
"(",
"requiresMa... | Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups | [
"Creates",
"an",
"appropriate",
"HSGE",
"for",
"a",
"domain",
"-",
"wide",
"resource",
"of",
"a",
"type",
"that",
"is",
"mappable",
"to",
"server",
"groups"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/HostServerGroupTracker.java#L302-L311 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/HostServerGroupTracker.java | HostServerGroupTracker.getHostEffect | private synchronized HostServerGroupEffect getHostEffect(PathAddress address, String host, Resource root) {
if (requiresMapping) {
map(root);
requiresMapping = false;
}
Set<String> mapped = hostsToGroups.get(host);
if (mapped == null) {
// Unassigned ... | java | private synchronized HostServerGroupEffect getHostEffect(PathAddress address, String host, Resource root) {
if (requiresMapping) {
map(root);
requiresMapping = false;
}
Set<String> mapped = hostsToGroups.get(host);
if (mapped == null) {
// Unassigned ... | [
"private",
"synchronized",
"HostServerGroupEffect",
"getHostEffect",
"(",
"PathAddress",
"address",
",",
"String",
"host",
",",
"Resource",
"root",
")",
"{",
"if",
"(",
"requiresMapping",
")",
"{",
"map",
"(",
"root",
")",
";",
"requiresMapping",
"=",
"false",
... | Creates an appropriate HSGE for resources in the host tree, excluding the server and server-config subtrees | [
"Creates",
"an",
"appropriate",
"HSGE",
"for",
"resources",
"in",
"the",
"host",
"tree",
"excluding",
"the",
"server",
"and",
"server",
"-",
"config",
"subtrees"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/HostServerGroupTracker.java#L314-L335 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/HostServerGroupTracker.java | HostServerGroupTracker.map | private void map(Resource root) {
for (Resource.ResourceEntry serverGroup : root.getChildren(SERVER_GROUP)) {
String serverGroupName = serverGroup.getName();
ModelNode serverGroupModel = serverGroup.getModel();
String profile = serverGroupModel.require(PROFILE).asString();
... | java | private void map(Resource root) {
for (Resource.ResourceEntry serverGroup : root.getChildren(SERVER_GROUP)) {
String serverGroupName = serverGroup.getName();
ModelNode serverGroupModel = serverGroup.getModel();
String profile = serverGroupModel.require(PROFILE).asString();
... | [
"private",
"void",
"map",
"(",
"Resource",
"root",
")",
"{",
"for",
"(",
"Resource",
".",
"ResourceEntry",
"serverGroup",
":",
"root",
".",
"getChildren",
"(",
"SERVER_GROUP",
")",
")",
"{",
"String",
"serverGroupName",
"=",
"serverGroup",
".",
"getName",
"(... | Only call with monitor for 'this' held | [
"Only",
"call",
"with",
"monitor",
"for",
"this",
"held"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/HostServerGroupTracker.java#L338-L366 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/registry/LegacyResourceDefinition.java | LegacyResourceDefinition.registerAttributes | @Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
for (AttributeAccess attr : attributes.values()) {
resourceRegistration.registerReadOnlyAttribute(attr.getAttributeDefinition(), null);
}
} | java | @Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
for (AttributeAccess attr : attributes.values()) {
resourceRegistration.registerReadOnlyAttribute(attr.getAttributeDefinition(), null);
}
} | [
"@",
"Override",
"public",
"void",
"registerAttributes",
"(",
"ManagementResourceRegistration",
"resourceRegistration",
")",
"{",
"for",
"(",
"AttributeAccess",
"attr",
":",
"attributes",
".",
"values",
"(",
")",
")",
"{",
"resourceRegistration",
".",
"registerReadOnl... | Register operations associated with this resource.
@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition | [
"Register",
"operations",
"associated",
"with",
"this",
"resource",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/registry/LegacyResourceDefinition.java#L135-L140 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/registry/LegacyResourceDefinition.java | LegacyResourceDefinition.registerChildren | @Override
public void registerChildren(ManagementResourceRegistration resourceRegistration) {
// Register wildcard children last to prevent duplicate registration errors when override definitions exist
for (ResourceDefinition rd : singletonChildren) {
resourceRegistration.registerSubMode... | java | @Override
public void registerChildren(ManagementResourceRegistration resourceRegistration) {
// Register wildcard children last to prevent duplicate registration errors when override definitions exist
for (ResourceDefinition rd : singletonChildren) {
resourceRegistration.registerSubMode... | [
"@",
"Override",
"public",
"void",
"registerChildren",
"(",
"ManagementResourceRegistration",
"resourceRegistration",
")",
"{",
"// Register wildcard children last to prevent duplicate registration errors when override definitions exist",
"for",
"(",
"ResourceDefinition",
"rd",
":",
... | Register child resources associated with this resource.
@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition | [
"Register",
"child",
"resources",
"associated",
"with",
"this",
"resource",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/registry/LegacyResourceDefinition.java#L147-L156 | train |
wildfly/wildfly-core | remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java | ManagementRemotingServices.installDomainConnectorServices | public static void installDomainConnectorServices(final OperationContext context,
final ServiceTarget serviceTarget,
final ServiceName endpointName,
final Ser... | java | public static void installDomainConnectorServices(final OperationContext context,
final ServiceTarget serviceTarget,
final ServiceName endpointName,
final Ser... | [
"public",
"static",
"void",
"installDomainConnectorServices",
"(",
"final",
"OperationContext",
"context",
",",
"final",
"ServiceTarget",
"serviceTarget",
",",
"final",
"ServiceName",
"endpointName",
",",
"final",
"ServiceName",
"networkInterfaceBinding",
",",
"final",
"i... | Installs a remoting stream server for a domain instance
@param serviceTarget the service target to install the services into
@param endpointName the name of the endpoint to install the stream server into
@param networkInterfaceBinding the network interface binding
@param port the port
@param securityRealm the security ... | [
"Installs",
"a",
"remoting",
"stream",
"server",
"for",
"a",
"domain",
"instance"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java#L89-L103 | train |
wildfly/wildfly-core | remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java | ManagementRemotingServices.installManagementChannelServices | public static void installManagementChannelServices(
final ServiceTarget serviceTarget,
final ServiceName endpointName,
final AbstractModelControllerOperationHandlerFactoryService operationHandlerService,
final ServiceName modelControllerName,
final String cha... | java | public static void installManagementChannelServices(
final ServiceTarget serviceTarget,
final ServiceName endpointName,
final AbstractModelControllerOperationHandlerFactoryService operationHandlerService,
final ServiceName modelControllerName,
final String cha... | [
"public",
"static",
"void",
"installManagementChannelServices",
"(",
"final",
"ServiceTarget",
"serviceTarget",
",",
"final",
"ServiceName",
"endpointName",
",",
"final",
"AbstractModelControllerOperationHandlerFactoryService",
"operationHandlerService",
",",
"final",
"ServiceNam... | Set up the services to create a channel listener and operation handler service.
@param serviceTarget the service target to install the services into
@param endpointName the endpoint name to install the services into
@param channelName the name of the channel
@param executorServiceName service name of the executor servi... | [
"Set",
"up",
"the",
"services",
"to",
"create",
"a",
"channel",
"listener",
"and",
"operation",
"handler",
"service",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java#L145-L165 | train |
wildfly/wildfly-core | remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java | ManagementRemotingServices.isManagementResourceRemoveable | public static void isManagementResourceRemoveable(OperationContext context, PathAddress otherManagementEndpoint) throws OperationFailedException {
ModelNode remotingConnector;
try {
remotingConnector = context.readResourceFromRoot(
PathAddress.pathAddress(PathElement.path... | java | public static void isManagementResourceRemoveable(OperationContext context, PathAddress otherManagementEndpoint) throws OperationFailedException {
ModelNode remotingConnector;
try {
remotingConnector = context.readResourceFromRoot(
PathAddress.pathAddress(PathElement.path... | [
"public",
"static",
"void",
"isManagementResourceRemoveable",
"(",
"OperationContext",
"context",
",",
"PathAddress",
"otherManagementEndpoint",
")",
"throws",
"OperationFailedException",
"{",
"ModelNode",
"remotingConnector",
";",
"try",
"{",
"remotingConnector",
"=",
"con... | Manual check because introducing a capability can't be done without a full refactoring.
This has to go as soon as the management interfaces are redesigned.
@param context the OperationContext
@param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint.
@throws OperationFail... | [
"Manual",
"check",
"because",
"introducing",
"a",
"capability",
"can",
"t",
"be",
"done",
"without",
"a",
"full",
"refactoring",
".",
"This",
"has",
"to",
"go",
"as",
"soon",
"as",
"the",
"management",
"interfaces",
"are",
"redesigned",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java#L183-L199 | train |
wildfly/wildfly-core | elytron/src/main/java/org/wildfly/extension/elytron/CertificateChainAttributeDefinitions.java | CertificateChainAttributeDefinitions.writeCertificates | static void writeCertificates(final ModelNode result, final Certificate[] certificates) throws CertificateEncodingException, NoSuchAlgorithmException {
if (certificates != null) {
for (Certificate current : certificates) {
ModelNode certificate = new ModelNode();
writ... | java | static void writeCertificates(final ModelNode result, final Certificate[] certificates) throws CertificateEncodingException, NoSuchAlgorithmException {
if (certificates != null) {
for (Certificate current : certificates) {
ModelNode certificate = new ModelNode();
writ... | [
"static",
"void",
"writeCertificates",
"(",
"final",
"ModelNode",
"result",
",",
"final",
"Certificate",
"[",
"]",
"certificates",
")",
"throws",
"CertificateEncodingException",
",",
"NoSuchAlgorithmException",
"{",
"if",
"(",
"certificates",
"!=",
"null",
")",
"{",... | Populate the supplied response with the model representation of the certificates.
@param result the response to populate.
@param certificates the certificates to add to the response.
@throws CertificateEncodingException
@throws NoSuchAlgorithmException | [
"Populate",
"the",
"supplied",
"response",
"with",
"the",
"model",
"representation",
"of",
"the",
"certificates",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/elytron/src/main/java/org/wildfly/extension/elytron/CertificateChainAttributeDefinitions.java#L156-L164 | train |
wildfly/wildfly-core | jmx/src/main/java/org/jboss/as/jmx/model/ModelControllerMBeanHelper.java | ModelControllerMBeanHelper.setQueryExpServer | private static MBeanServer setQueryExpServer(QueryExp query, MBeanServer toSet) {
// We assume the QueryExp is a QueryEval subclass or uses the QueryEval thread local
// mechanism to store any existing MBeanServer. If that's not the case we have no
// way to access the old mbeanserver to let us ... | java | private static MBeanServer setQueryExpServer(QueryExp query, MBeanServer toSet) {
// We assume the QueryExp is a QueryEval subclass or uses the QueryEval thread local
// mechanism to store any existing MBeanServer. If that's not the case we have no
// way to access the old mbeanserver to let us ... | [
"private",
"static",
"MBeanServer",
"setQueryExpServer",
"(",
"QueryExp",
"query",
",",
"MBeanServer",
"toSet",
")",
"{",
"// We assume the QueryExp is a QueryEval subclass or uses the QueryEval thread local",
"// mechanism to store any existing MBeanServer. If that's not the case we have ... | Set the mbean server on the QueryExp and try and pass back any previously set one | [
"Set",
"the",
"mbean",
"server",
"on",
"the",
"QueryExp",
"and",
"try",
"and",
"pass",
"back",
"any",
"previously",
"set",
"one"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/jmx/src/main/java/org/jboss/as/jmx/model/ModelControllerMBeanHelper.java#L234-L241 | train |
wildfly/wildfly-core | jmx/src/main/java/org/jboss/as/jmx/model/ModelControllerMBeanHelper.java | ModelControllerMBeanHelper.toPathAddress | PathAddress toPathAddress(final ObjectName name) {
return ObjectNameAddressUtil.toPathAddress(rootObjectInstance.getObjectName(), getRootResourceAndRegistration().getRegistration(), name);
} | java | PathAddress toPathAddress(final ObjectName name) {
return ObjectNameAddressUtil.toPathAddress(rootObjectInstance.getObjectName(), getRootResourceAndRegistration().getRegistration(), name);
} | [
"PathAddress",
"toPathAddress",
"(",
"final",
"ObjectName",
"name",
")",
"{",
"return",
"ObjectNameAddressUtil",
".",
"toPathAddress",
"(",
"rootObjectInstance",
".",
"getObjectName",
"(",
")",
",",
"getRootResourceAndRegistration",
"(",
")",
".",
"getRegistration",
"... | Convert an ObjectName to a PathAddress.
Patterns are supported: there may not be a resource at the returned PathAddress but a resource model <strong>MUST</strong>
must be registered. | [
"Convert",
"an",
"ObjectName",
"to",
"a",
"PathAddress",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/jmx/src/main/java/org/jboss/as/jmx/model/ModelControllerMBeanHelper.java#L259-L261 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolHandlers.java | TransactionalProtocolHandlers.createClient | public static TransactionalProtocolClient createClient(final ManagementChannelHandler channelAssociation) {
final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl(channelAssociation);
channelAssociation.addHandlerFactory(client);
return client;
} | java | public static TransactionalProtocolClient createClient(final ManagementChannelHandler channelAssociation) {
final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl(channelAssociation);
channelAssociation.addHandlerFactory(client);
return client;
} | [
"public",
"static",
"TransactionalProtocolClient",
"createClient",
"(",
"final",
"ManagementChannelHandler",
"channelAssociation",
")",
"{",
"final",
"TransactionalProtocolClientImpl",
"client",
"=",
"new",
"TransactionalProtocolClientImpl",
"(",
"channelAssociation",
")",
";",... | Create a transactional protocol client.
@param channelAssociation the channel handler
@return the transactional protocol client | [
"Create",
"a",
"transactional",
"protocol",
"client",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolHandlers.java#L47-L51 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolHandlers.java | TransactionalProtocolHandlers.wrap | public static TransactionalProtocolClient.Operation wrap(final ModelNode operation, final OperationMessageHandler messageHandler, final OperationAttachments attachments) {
return new TransactionalOperationImpl(operation, messageHandler, attachments);
} | java | public static TransactionalProtocolClient.Operation wrap(final ModelNode operation, final OperationMessageHandler messageHandler, final OperationAttachments attachments) {
return new TransactionalOperationImpl(operation, messageHandler, attachments);
} | [
"public",
"static",
"TransactionalProtocolClient",
".",
"Operation",
"wrap",
"(",
"final",
"ModelNode",
"operation",
",",
"final",
"OperationMessageHandler",
"messageHandler",
",",
"final",
"OperationAttachments",
"attachments",
")",
"{",
"return",
"new",
"TransactionalOp... | Wrap an operation's parameters in a simple encapsulating object
@param operation the operation
@param messageHandler the message handler
@param attachments the attachments
@return the encapsulating object | [
"Wrap",
"an",
"operation",
"s",
"parameters",
"in",
"a",
"simple",
"encapsulating",
"object"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolHandlers.java#L60-L62 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolHandlers.java | TransactionalProtocolHandlers.executeBlocking | public static TransactionalProtocolClient.PreparedOperation<TransactionalProtocolClient.Operation> executeBlocking(final ModelNode operation, TransactionalProtocolClient client) throws IOException, InterruptedException {
final BlockingQueueOperationListener<TransactionalProtocolClient.Operation> listener = new ... | java | public static TransactionalProtocolClient.PreparedOperation<TransactionalProtocolClient.Operation> executeBlocking(final ModelNode operation, TransactionalProtocolClient client) throws IOException, InterruptedException {
final BlockingQueueOperationListener<TransactionalProtocolClient.Operation> listener = new ... | [
"public",
"static",
"TransactionalProtocolClient",
".",
"PreparedOperation",
"<",
"TransactionalProtocolClient",
".",
"Operation",
">",
"executeBlocking",
"(",
"final",
"ModelNode",
"operation",
",",
"TransactionalProtocolClient",
"client",
")",
"throws",
"IOException",
","... | Execute blocking for a prepared result.
@param operation the operation to execute
@param client the protocol client
@return the prepared operation
@throws IOException
@throws InterruptedException | [
"Execute",
"blocking",
"for",
"a",
"prepared",
"result",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolHandlers.java#L73-L77 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/gui/component/ServerLogsTableModel.java | ServerLogsTableModel.init | private void init() {
if (initialized.compareAndSet(false, true)) {
final RowSorter<? extends TableModel> rowSorter = table.getRowSorter();
rowSorter.toggleSortOrder(1); // sort by date
rowSorter.toggleSortOrder(1); // descending
final TableColumnModel columnModel... | java | private void init() {
if (initialized.compareAndSet(false, true)) {
final RowSorter<? extends TableModel> rowSorter = table.getRowSorter();
rowSorter.toggleSortOrder(1); // sort by date
rowSorter.toggleSortOrder(1); // descending
final TableColumnModel columnModel... | [
"private",
"void",
"init",
"(",
")",
"{",
"if",
"(",
"initialized",
".",
"compareAndSet",
"(",
"false",
",",
"true",
")",
")",
"{",
"final",
"RowSorter",
"<",
"?",
"extends",
"TableModel",
">",
"rowSorter",
"=",
"table",
".",
"getRowSorter",
"(",
")",
... | Initializes the model | [
"Initializes",
"the",
"model"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/gui/component/ServerLogsTableModel.java#L91-L100 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/management/DeleteOp.java | DeleteOp.execute | public void execute() throws IOException {
try {
prepare();
boolean commitResult = commit();
if (commitResult == false) {
throw PatchLogger.ROOT_LOGGER.failedToDeleteBackup();
}
} catch (PrepareException pe){
rollback();
... | java | public void execute() throws IOException {
try {
prepare();
boolean commitResult = commit();
if (commitResult == false) {
throw PatchLogger.ROOT_LOGGER.failedToDeleteBackup();
}
} catch (PrepareException pe){
rollback();
... | [
"public",
"void",
"execute",
"(",
")",
"throws",
"IOException",
"{",
"try",
"{",
"prepare",
"(",
")",
";",
"boolean",
"commitResult",
"=",
"commit",
"(",
")",
";",
"if",
"(",
"commitResult",
"==",
"false",
")",
"{",
"throw",
"PatchLogger",
".",
"ROOT_LOG... | remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.
The operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.
If an error occurs in the first step of the operation, al... | [
"remove",
"files",
"from",
"directory",
".",
"All",
"-",
"or",
"-",
"nothing",
"operation",
"-",
"if",
"any",
"of",
"the",
"files",
"fails",
"to",
"be",
"removed",
"all",
"deleted",
"files",
"are",
"restored",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/management/DeleteOp.java#L54-L68 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/controller/git/GitRepository.java | GitRepository.rollback | public void rollback() throws GitAPIException {
try (Git git = getGit()) {
git.reset().setMode(ResetCommand.ResetType.HARD).setRef(HEAD).call();
}
} | java | public void rollback() throws GitAPIException {
try (Git git = getGit()) {
git.reset().setMode(ResetCommand.ResetType.HARD).setRef(HEAD).call();
}
} | [
"public",
"void",
"rollback",
"(",
")",
"throws",
"GitAPIException",
"{",
"try",
"(",
"Git",
"git",
"=",
"getGit",
"(",
")",
")",
"{",
"git",
".",
"reset",
"(",
")",
".",
"setMode",
"(",
"ResetCommand",
".",
"ResetType",
".",
"HARD",
")",
".",
"setRe... | Reset hard on HEAD.
@throws GitAPIException | [
"Reset",
"hard",
"on",
"HEAD",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/controller/git/GitRepository.java#L294-L298 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/controller/git/GitRepository.java | GitRepository.commit | public void commit(String msg) throws GitAPIException {
try (Git git = getGit()) {
Status status = git.status().call();
if (!status.isClean()) {
git.commit().setMessage(msg).setAll(true).setNoVerify(true).call();
}
}
} | java | public void commit(String msg) throws GitAPIException {
try (Git git = getGit()) {
Status status = git.status().call();
if (!status.isClean()) {
git.commit().setMessage(msg).setAll(true).setNoVerify(true).call();
}
}
} | [
"public",
"void",
"commit",
"(",
"String",
"msg",
")",
"throws",
"GitAPIException",
"{",
"try",
"(",
"Git",
"git",
"=",
"getGit",
"(",
")",
")",
"{",
"Status",
"status",
"=",
"git",
".",
"status",
"(",
")",
".",
"call",
"(",
")",
";",
"if",
"(",
... | Commit all changes if there are uncommitted changes.
@param msg the commit message.
@throws GitAPIException | [
"Commit",
"all",
"changes",
"if",
"there",
"are",
"uncommitted",
"changes",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/controller/git/GitRepository.java#L306-L313 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/extension/ExtensionAddHandler.java | ExtensionAddHandler.initializeExtension | static void initializeExtension(ExtensionRegistry extensionRegistry, String module,
ManagementResourceRegistration rootRegistration,
ExtensionRegistryType extensionRegistryType) {
try {
boolean unknownModule = false;
... | java | static void initializeExtension(ExtensionRegistry extensionRegistry, String module,
ManagementResourceRegistration rootRegistration,
ExtensionRegistryType extensionRegistryType) {
try {
boolean unknownModule = false;
... | [
"static",
"void",
"initializeExtension",
"(",
"ExtensionRegistry",
"extensionRegistry",
",",
"String",
"module",
",",
"ManagementResourceRegistration",
"rootRegistration",
",",
"ExtensionRegistryType",
"extensionRegistryType",
")",
"{",
"try",
"{",
"boolean",
"unknownModule",... | Initialise an extension module's extensions in the extension registry
@param extensionRegistry the extension registry
@param module the name of the module containing the extensions
@param rootRegistration The parent registration of the extensions. For a server or domain.xml extension, this will be the root resource re... | [
"Initialise",
"an",
"extension",
"module",
"s",
"extensions",
"in",
"the",
"extension",
"registry"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/extension/ExtensionAddHandler.java#L114-L149 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java | PathManagerService.addDependent | private void addDependent(String pathName, String relativeTo) {
if (relativeTo != null) {
Set<String> dependents = dependenctRelativePaths.get(relativeTo);
if (dependents == null) {
dependents = new HashSet<String>();
dependenctRelativePaths.put(relativeTo... | java | private void addDependent(String pathName, String relativeTo) {
if (relativeTo != null) {
Set<String> dependents = dependenctRelativePaths.get(relativeTo);
if (dependents == null) {
dependents = new HashSet<String>();
dependenctRelativePaths.put(relativeTo... | [
"private",
"void",
"addDependent",
"(",
"String",
"pathName",
",",
"String",
"relativeTo",
")",
"{",
"if",
"(",
"relativeTo",
"!=",
"null",
")",
"{",
"Set",
"<",
"String",
">",
"dependents",
"=",
"dependenctRelativePaths",
".",
"get",
"(",
"relativeTo",
")",... | Must be called with pathEntries lock taken | [
"Must",
"be",
"called",
"with",
"pathEntries",
"lock",
"taken"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L359-L368 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java | PathManagerService.getAllDependents | private void getAllDependents(Set<PathEntry> result, String name) {
Set<String> depNames = dependenctRelativePaths.get(name);
if (depNames == null) {
return;
}
for (String dep : depNames) {
PathEntry entry = pathEntries.get(dep);
if (entry != null) {
... | java | private void getAllDependents(Set<PathEntry> result, String name) {
Set<String> depNames = dependenctRelativePaths.get(name);
if (depNames == null) {
return;
}
for (String dep : depNames) {
PathEntry entry = pathEntries.get(dep);
if (entry != null) {
... | [
"private",
"void",
"getAllDependents",
"(",
"Set",
"<",
"PathEntry",
">",
"result",
",",
"String",
"name",
")",
"{",
"Set",
"<",
"String",
">",
"depNames",
"=",
"dependenctRelativePaths",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"depNames",
"==",
"n... | Call with pathEntries lock taken | [
"Call",
"with",
"pathEntries",
"lock",
"taken"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L463-L475 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/model/jvm/JvmOptionsElement.java | JvmOptionsElement.addOption | void addOption(final String value) {
Assert.checkNotNullParam("value", value);
synchronized (options) {
options.add(value);
}
} | java | void addOption(final String value) {
Assert.checkNotNullParam("value", value);
synchronized (options) {
options.add(value);
}
} | [
"void",
"addOption",
"(",
"final",
"String",
"value",
")",
"{",
"Assert",
".",
"checkNotNullParam",
"(",
"\"value\"",
",",
"value",
")",
";",
"synchronized",
"(",
"options",
")",
"{",
"options",
".",
"add",
"(",
"value",
")",
";",
"}",
"}"
] | Adds an option to the Jvm options
@param value the option to add | [
"Adds",
"an",
"option",
"to",
"the",
"Jvm",
"options"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/model/jvm/JvmOptionsElement.java#L51-L56 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/AttachmentKey.java | AttachmentKey.create | @SuppressWarnings("unchecked")
public static <T> AttachmentKey<T> create(final Class<? super T> valueClass) {
return new SimpleAttachmentKey(valueClass);
} | java | @SuppressWarnings("unchecked")
public static <T> AttachmentKey<T> create(final Class<? super T> valueClass) {
return new SimpleAttachmentKey(valueClass);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"AttachmentKey",
"<",
"T",
">",
"create",
"(",
"final",
"Class",
"<",
"?",
"super",
"T",
">",
"valueClass",
")",
"{",
"return",
"new",
"SimpleAttachmentKey",
"(",
"value... | Construct a new simple attachment key.
@param valueClass the value class
@param <T> the attachment type
@return the new instance | [
"Construct",
"a",
"new",
"simple",
"attachment",
"key",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/AttachmentKey.java#L50-L53 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/PatchContentLoader.java | PatchContentLoader.openContentStream | InputStream openContentStream(final ContentItem item) throws IOException {
final File file = getFile(item);
if (file == null) {
throw new IllegalStateException();
}
return new FileInputStream(file);
} | java | InputStream openContentStream(final ContentItem item) throws IOException {
final File file = getFile(item);
if (file == null) {
throw new IllegalStateException();
}
return new FileInputStream(file);
} | [
"InputStream",
"openContentStream",
"(",
"final",
"ContentItem",
"item",
")",
"throws",
"IOException",
"{",
"final",
"File",
"file",
"=",
"getFile",
"(",
"item",
")",
";",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(... | Open a new content stream.
@param item the content item
@return the content stream | [
"Open",
"a",
"new",
"content",
"stream",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/PatchContentLoader.java#L66-L72 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/impl/aesh/cmd/security/model/SSLSecurityBuilder.java | SSLSecurityBuilder.buildExecutableRequest | public ModelNode buildExecutableRequest(CommandContext ctx) throws Exception {
try {
for (FailureDescProvider h : providers) {
effectiveProviders.add(h);
}
// In case some key-store needs to be persisted
for (String ks : ksToStore) {
... | java | public ModelNode buildExecutableRequest(CommandContext ctx) throws Exception {
try {
for (FailureDescProvider h : providers) {
effectiveProviders.add(h);
}
// In case some key-store needs to be persisted
for (String ks : ksToStore) {
... | [
"public",
"ModelNode",
"buildExecutableRequest",
"(",
"CommandContext",
"ctx",
")",
"throws",
"Exception",
"{",
"try",
"{",
"for",
"(",
"FailureDescProvider",
"h",
":",
"providers",
")",
"{",
"effectiveProviders",
".",
"add",
"(",
"h",
")",
";",
"}",
"// In ca... | Sort and order steps to avoid unwanted generation | [
"Sort",
"and",
"order",
"steps",
"to",
"avoid",
"unwanted",
"generation"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/impl/aesh/cmd/security/model/SSLSecurityBuilder.java#L100-L129 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/module/ManifestAttachmentProcessor.java | ManifestAttachmentProcessor.deploy | @Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
List<ResourceRoot> resourceRoots = DeploymentUtils.allResourceRoots(deploymentUnit);
for (ResourceRoot resourc... | java | @Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
List<ResourceRoot> resourceRoots = DeploymentUtils.allResourceRoots(deploymentUnit);
for (ResourceRoot resourc... | [
"@",
"Override",
"public",
"void",
"deploy",
"(",
"DeploymentPhaseContext",
"phaseContext",
")",
"throws",
"DeploymentUnitProcessingException",
"{",
"final",
"DeploymentUnit",
"deploymentUnit",
"=",
"phaseContext",
".",
"getDeploymentUnit",
"(",
")",
";",
"List",
"<",
... | Process the deployment root for the manifest.
@param phaseContext the deployment unit context
@throws DeploymentUnitProcessingException | [
"Process",
"the",
"deployment",
"root",
"for",
"the",
"manifest",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/module/ManifestAttachmentProcessor.java#L56-L69 | train |
wildfly/wildfly-core | elytron/src/main/java/org/wildfly/extension/elytron/MapperParser.java | MapperParser.getSimpleMapperParser | private PersistentResourceXMLDescription getSimpleMapperParser() {
if (version.equals(Version.VERSION_1_0)) {
return simpleMapperParser_1_0;
} else if (version.equals(Version.VERSION_1_1)) {
return simpleMapperParser_1_1;
}
return simpleMapperParser;
} | java | private PersistentResourceXMLDescription getSimpleMapperParser() {
if (version.equals(Version.VERSION_1_0)) {
return simpleMapperParser_1_0;
} else if (version.equals(Version.VERSION_1_1)) {
return simpleMapperParser_1_1;
}
return simpleMapperParser;
} | [
"private",
"PersistentResourceXMLDescription",
"getSimpleMapperParser",
"(",
")",
"{",
"if",
"(",
"version",
".",
"equals",
"(",
"Version",
".",
"VERSION_1_0",
")",
")",
"{",
"return",
"simpleMapperParser_1_0",
";",
"}",
"else",
"if",
"(",
"version",
".",
"equal... | 1.0 version of parser is different at simple mapperParser | [
"1",
".",
"0",
"version",
"of",
"parser",
"is",
"different",
"at",
"simple",
"mapperParser"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/elytron/src/main/java/org/wildfly/extension/elytron/MapperParser.java#L235-L242 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/DeploymentUtils.java | DeploymentUtils.getTopDeploymentUnit | public static DeploymentUnit getTopDeploymentUnit(DeploymentUnit unit) {
Assert.checkNotNullParam("unit", unit);
DeploymentUnit parent = unit.getParent();
while (parent != null) {
unit = parent;
parent = unit.getParent();
}
return unit;
} | java | public static DeploymentUnit getTopDeploymentUnit(DeploymentUnit unit) {
Assert.checkNotNullParam("unit", unit);
DeploymentUnit parent = unit.getParent();
while (parent != null) {
unit = parent;
parent = unit.getParent();
}
return unit;
} | [
"public",
"static",
"DeploymentUnit",
"getTopDeploymentUnit",
"(",
"DeploymentUnit",
"unit",
")",
"{",
"Assert",
".",
"checkNotNullParam",
"(",
"\"unit\"",
",",
"unit",
")",
";",
"DeploymentUnit",
"parent",
"=",
"unit",
".",
"getParent",
"(",
")",
";",
"while",
... | Get top deployment unit.
@param unit the current deployment unit
@return top deployment unit | [
"Get",
"top",
"deployment",
"unit",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentUtils.java#L80-L89 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnection.java | RemoteDomainConnection.openConnection | protected Connection openConnection() throws IOException {
// Perhaps this can just be done once?
CallbackHandler callbackHandler = null;
SSLContext sslContext = null;
if (realm != null) {
sslContext = realm.getSSLContext();
CallbackHandlerFactory handlerFactory =... | java | protected Connection openConnection() throws IOException {
// Perhaps this can just be done once?
CallbackHandler callbackHandler = null;
SSLContext sslContext = null;
if (realm != null) {
sslContext = realm.getSSLContext();
CallbackHandlerFactory handlerFactory =... | [
"protected",
"Connection",
"openConnection",
"(",
")",
"throws",
"IOException",
"{",
"// Perhaps this can just be done once?",
"CallbackHandler",
"callbackHandler",
"=",
"null",
";",
"SSLContext",
"sslContext",
"=",
"null",
";",
"if",
"(",
"realm",
"!=",
"null",
")",
... | Connect and register at the remote domain controller.
@return connection the established connection
@throws IOException | [
"Connect",
"and",
"register",
"at",
"the",
"remote",
"domain",
"controller",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnection.java#L202-L230 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnection.java | RemoteDomainConnection.applyDomainModel | boolean applyDomainModel(ModelNode result) {
if(! result.hasDefined(ModelDescriptionConstants.RESULT)) {
return false;
}
final List<ModelNode> bootOperations= result.get(ModelDescriptionConstants.RESULT).asList();
return callback.applyDomainModel(bootOperations);
} | java | boolean applyDomainModel(ModelNode result) {
if(! result.hasDefined(ModelDescriptionConstants.RESULT)) {
return false;
}
final List<ModelNode> bootOperations= result.get(ModelDescriptionConstants.RESULT).asList();
return callback.applyDomainModel(bootOperations);
} | [
"boolean",
"applyDomainModel",
"(",
"ModelNode",
"result",
")",
"{",
"if",
"(",
"!",
"result",
".",
"hasDefined",
"(",
"ModelDescriptionConstants",
".",
"RESULT",
")",
")",
"{",
"return",
"false",
";",
"}",
"final",
"List",
"<",
"ModelNode",
">",
"bootOperat... | Apply the remote read domain model result.
@param result the domain model result
@return whether it was applied successfully or not | [
"Apply",
"the",
"remote",
"read",
"domain",
"model",
"result",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/RemoteDomainConnection.java#L320-L326 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/ProcessHelper.java | ProcessHelper.addShutdownHook | public static Thread addShutdownHook(final Process process) {
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if (process != null) {
process.destroy();
try {
process.waitFor();... | java | public static Thread addShutdownHook(final Process process) {
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if (process != null) {
process.destroy();
try {
process.waitFor();... | [
"public",
"static",
"Thread",
"addShutdownHook",
"(",
"final",
"Process",
"process",
")",
"{",
"final",
"Thread",
"thread",
"=",
"new",
"Thread",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"if",
"(",
... | Adds a shutdown hook for the process.
@param process the process to add a shutdown hook for
@return the thread set as the shutdown hook
@throws java.lang.SecurityException If a security manager is present and it denies {@link
java.lang.RuntimePermission <code>RuntimePermission("shutdownHooks")</code>} | [
"Adds",
"a",
"shutdown",
"hook",
"for",
"the",
"process",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/ProcessHelper.java#L73-L90 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/operations/common/OrderedChildTypesAttachment.java | OrderedChildTypesAttachment.addOrderedChildResourceTypes | public void addOrderedChildResourceTypes(PathAddress resourceAddress, Resource resource) {
Set<String> orderedChildTypes = resource.getOrderedChildTypes();
if (orderedChildTypes.size() > 0) {
orderedChildren.put(resourceAddress, resource.getOrderedChildTypes());
}
} | java | public void addOrderedChildResourceTypes(PathAddress resourceAddress, Resource resource) {
Set<String> orderedChildTypes = resource.getOrderedChildTypes();
if (orderedChildTypes.size() > 0) {
orderedChildren.put(resourceAddress, resource.getOrderedChildTypes());
}
} | [
"public",
"void",
"addOrderedChildResourceTypes",
"(",
"PathAddress",
"resourceAddress",
",",
"Resource",
"resource",
")",
"{",
"Set",
"<",
"String",
">",
"orderedChildTypes",
"=",
"resource",
".",
"getOrderedChildTypes",
"(",
")",
";",
"if",
"(",
"orderedChildTypes... | If the resource has ordered child types, those child types will be stored in the attachment. If there are no
ordered child types, this method is a no-op.
@param resourceAddress the address of the resource
@param resource the resource which may or may not have ordered children. | [
"If",
"the",
"resource",
"has",
"ordered",
"child",
"types",
"those",
"child",
"types",
"will",
"be",
"stored",
"in",
"the",
"attachment",
".",
"If",
"there",
"are",
"no",
"ordered",
"child",
"types",
"this",
"method",
"is",
"a",
"no",
"-",
"op",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/operations/common/OrderedChildTypesAttachment.java#L32-L37 | train |
wildfly/wildfly-core | controller-client/src/main/java/org/jboss/as/controller/client/helpers/domain/impl/DeploymentPlanResultImpl.java | DeploymentPlanResultImpl.buildServerGroupResults | private static Map<String, ServerGroupDeploymentPlanResult> buildServerGroupResults(Map<UUID, DeploymentActionResult> deploymentActionResults) {
Map<String, ServerGroupDeploymentPlanResult> serverGroupResults = new HashMap<String, ServerGroupDeploymentPlanResult>();
for (Map.Entry<UUID, DeploymentActio... | java | private static Map<String, ServerGroupDeploymentPlanResult> buildServerGroupResults(Map<UUID, DeploymentActionResult> deploymentActionResults) {
Map<String, ServerGroupDeploymentPlanResult> serverGroupResults = new HashMap<String, ServerGroupDeploymentPlanResult>();
for (Map.Entry<UUID, DeploymentActio... | [
"private",
"static",
"Map",
"<",
"String",
",",
"ServerGroupDeploymentPlanResult",
">",
"buildServerGroupResults",
"(",
"Map",
"<",
"UUID",
",",
"DeploymentActionResult",
">",
"deploymentActionResults",
")",
"{",
"Map",
"<",
"String",
",",
"ServerGroupDeploymentPlanResu... | Builds the data structures that show the effects of the plan by server group | [
"Builds",
"the",
"data",
"structures",
"that",
"show",
"the",
"effects",
"of",
"the",
"plan",
"by",
"server",
"group"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller-client/src/main/java/org/jboss/as/controller/client/helpers/domain/impl/DeploymentPlanResultImpl.java#L102-L133 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java | AbstractTransformationDescriptionBuilder.buildDefault | protected TransformationDescription buildDefault(final DiscardPolicy discardPolicy, boolean inherited, final AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry, List<String> discardedOperations) {
// Build attribute rules
final Map<String, AttributeT... | java | protected TransformationDescription buildDefault(final DiscardPolicy discardPolicy, boolean inherited, final AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry, List<String> discardedOperations) {
// Build attribute rules
final Map<String, AttributeT... | [
"protected",
"TransformationDescription",
"buildDefault",
"(",
"final",
"DiscardPolicy",
"discardPolicy",
",",
"boolean",
"inherited",
",",
"final",
"AttributeTransformationDescriptionBuilderImpl",
".",
"AttributeTransformationDescriptionBuilderRegistry",
"registry",
",",
"List",
... | Build the default transformation description.
@param discardPolicy the discard policy to use
@param inherited whether the definition is inherited
@param registry the attribute transformation rules for the resource
@param discardedOperations the discarded operations
@return the transformation description | [
"Build",
"the",
"default",
"transformation",
"description",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java#L87-L109 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java | AbstractTransformationDescriptionBuilder.buildOperationTransformers | protected Map<String, OperationTransformer> buildOperationTransformers(AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry) {
final Map<String, OperationTransformer> operations = new HashMap<String, OperationTransformer>();
for(final Map.Entry<String,... | java | protected Map<String, OperationTransformer> buildOperationTransformers(AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry) {
final Map<String, OperationTransformer> operations = new HashMap<String, OperationTransformer>();
for(final Map.Entry<String,... | [
"protected",
"Map",
"<",
"String",
",",
"OperationTransformer",
">",
"buildOperationTransformers",
"(",
"AttributeTransformationDescriptionBuilderImpl",
".",
"AttributeTransformationDescriptionBuilderRegistry",
"registry",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Operat... | Build the operation transformers.
@param registry the shared resource registry
@return the operation transformers | [
"Build",
"the",
"operation",
"transformers",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java#L117-L124 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java | AbstractTransformationDescriptionBuilder.buildChildren | protected List<TransformationDescription> buildChildren() {
if(children.isEmpty()) {
return Collections.emptyList();
}
final List<TransformationDescription> children = new ArrayList<TransformationDescription>();
for(final TransformationDescriptionBuilder builder : this.childr... | java | protected List<TransformationDescription> buildChildren() {
if(children.isEmpty()) {
return Collections.emptyList();
}
final List<TransformationDescription> children = new ArrayList<TransformationDescription>();
for(final TransformationDescriptionBuilder builder : this.childr... | [
"protected",
"List",
"<",
"TransformationDescription",
">",
"buildChildren",
"(",
")",
"{",
"if",
"(",
"children",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"final",
"List",
"<",
"TransformationDescrip... | Build all children.
@return the child descriptions | [
"Build",
"all",
"children",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java#L131-L140 | train |
wildfly/wildfly-core | remoting/subsystem/src/main/java/org/jboss/as/remoting/EndpointConfigFactory.java | EndpointConfigFactory.create | @Deprecated
public static OptionMap create(final ExpressionResolver resolver, final ModelNode model, final OptionMap defaults) throws OperationFailedException {
final OptionMap map = OptionMap.builder()
.addAll(defaults)
.set(Options.WORKER_READ_THREADS, RemotingSubsystemRoot... | java | @Deprecated
public static OptionMap create(final ExpressionResolver resolver, final ModelNode model, final OptionMap defaults) throws OperationFailedException {
final OptionMap map = OptionMap.builder()
.addAll(defaults)
.set(Options.WORKER_READ_THREADS, RemotingSubsystemRoot... | [
"@",
"Deprecated",
"public",
"static",
"OptionMap",
"create",
"(",
"final",
"ExpressionResolver",
"resolver",
",",
"final",
"ModelNode",
"model",
",",
"final",
"OptionMap",
"defaults",
")",
"throws",
"OperationFailedException",
"{",
"final",
"OptionMap",
"map",
"=",... | creates option map for remoting connections
@param resolver
@param model
@param defaults
@return
@throws OperationFailedException
@deprecated configuring xnio worker options is no longer supported and should be replaced for referencing IO subsystem | [
"creates",
"option",
"map",
"for",
"remoting",
"connections"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/remoting/subsystem/src/main/java/org/jboss/as/remoting/EndpointConfigFactory.java#L61-L74 | train |
wildfly/wildfly-core | elytron/src/main/java/org/wildfly/extension/elytron/ElytronSubsystemParser2_0.java | ElytronSubsystemParser2_0.getParserDescription | @Override
public PersistentResourceXMLDescription getParserDescription() {
return PersistentResourceXMLDescription.builder(ElytronExtension.SUBSYSTEM_PATH, getNameSpace())
.addAttribute(ElytronDefinition.DEFAULT_AUTHENTICATION_CONTEXT)
.addAttribute(ElytronDefinition.INITIAL_... | java | @Override
public PersistentResourceXMLDescription getParserDescription() {
return PersistentResourceXMLDescription.builder(ElytronExtension.SUBSYSTEM_PATH, getNameSpace())
.addAttribute(ElytronDefinition.DEFAULT_AUTHENTICATION_CONTEXT)
.addAttribute(ElytronDefinition.INITIAL_... | [
"@",
"Override",
"public",
"PersistentResourceXMLDescription",
"getParserDescription",
"(",
")",
"{",
"return",
"PersistentResourceXMLDescription",
".",
"builder",
"(",
"ElytronExtension",
".",
"SUBSYSTEM_PATH",
",",
"getNameSpace",
"(",
")",
")",
".",
"addAttribute",
"... | at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves. | [
"at",
"this",
"point",
"definition",
"below",
"is",
"not",
"really",
"needed",
"as",
"it",
"is",
"the",
"same",
"as",
"for",
"1",
".",
"1",
"but",
"it",
"is",
"here",
"as",
"place",
"holder",
"when",
"subsystem",
"parser",
"evolves",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/elytron/src/main/java/org/wildfly/extension/elytron/ElytronSubsystemParser2_0.java#L43-L65 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java | WritableAuthorizerConfiguration.reset | public synchronized void reset() {
this.authorizerDescription = StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION;
this.useIdentityRoles = this.nonFacadeMBeansSensitive = false;
this.roleMappings = new HashMap<String, RoleMappingImpl>();
RoleMaps oldRoleMaps = this.roleMaps;
this.rol... | java | public synchronized void reset() {
this.authorizerDescription = StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION;
this.useIdentityRoles = this.nonFacadeMBeansSensitive = false;
this.roleMappings = new HashMap<String, RoleMappingImpl>();
RoleMaps oldRoleMaps = this.roleMaps;
this.rol... | [
"public",
"synchronized",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"authorizerDescription",
"=",
"StandardRBACAuthorizer",
".",
"AUTHORIZER_DESCRIPTION",
";",
"this",
".",
"useIdentityRoles",
"=",
"this",
".",
"nonFacadeMBeansSensitive",
"=",
"false",
";",
"this... | Reset the internal state of this object back to what it originally was.
Used then reloading a server or in a slave host controller following a post-boot reconnect
to the master. | [
"Reset",
"the",
"internal",
"state",
"of",
"this",
"object",
"back",
"to",
"what",
"it",
"originally",
"was",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java#L72-L87 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java | WritableAuthorizerConfiguration.addRoleMapping | public synchronized void addRoleMapping(final String roleName) {
HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
if (newRoles.containsKey(roleName) == false) {
newRoles.put(roleName, new RoleMappingImpl(roleName));
roleMappings = Co... | java | public synchronized void addRoleMapping(final String roleName) {
HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
if (newRoles.containsKey(roleName) == false) {
newRoles.put(roleName, new RoleMappingImpl(roleName));
roleMappings = Co... | [
"public",
"synchronized",
"void",
"addRoleMapping",
"(",
"final",
"String",
"roleName",
")",
"{",
"HashMap",
"<",
"String",
",",
"RoleMappingImpl",
">",
"newRoles",
"=",
"new",
"HashMap",
"<",
"String",
",",
"RoleMappingImpl",
">",
"(",
"roleMappings",
")",
";... | Adds a new role to the list of defined roles.
@param roleName - The name of the role being added. | [
"Adds",
"a",
"new",
"role",
"to",
"the",
"list",
"of",
"defined",
"roles",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java#L176-L182 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java | WritableAuthorizerConfiguration.removeRoleMapping | public synchronized Object removeRoleMapping(final String roleName) {
/*
* Would not expect this to happen during boot so don't offer the 'immediate' optimisation.
*/
HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
if (newRoles.co... | java | public synchronized Object removeRoleMapping(final String roleName) {
/*
* Would not expect this to happen during boot so don't offer the 'immediate' optimisation.
*/
HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
if (newRoles.co... | [
"public",
"synchronized",
"Object",
"removeRoleMapping",
"(",
"final",
"String",
"roleName",
")",
"{",
"/*\n * Would not expect this to happen during boot so don't offer the 'immediate' optimisation.\n */",
"HashMap",
"<",
"String",
",",
"RoleMappingImpl",
">",
"new... | Remove a role from the list of defined roles.
@param roleName - The name of the role to be removed.
@return A key that can be used to undo the removal. | [
"Remove",
"a",
"role",
"from",
"the",
"list",
"of",
"defined",
"roles",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java#L190-L205 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java | WritableAuthorizerConfiguration.undoRoleMappingRemove | public synchronized boolean undoRoleMappingRemove(final Object removalKey) {
HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
RoleMappingImpl toRestore = removedRoles.remove(removalKey);
if (toRestore != null && newRoles.containsKey(toRestore.getNam... | java | public synchronized boolean undoRoleMappingRemove(final Object removalKey) {
HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
RoleMappingImpl toRestore = removedRoles.remove(removalKey);
if (toRestore != null && newRoles.containsKey(toRestore.getNam... | [
"public",
"synchronized",
"boolean",
"undoRoleMappingRemove",
"(",
"final",
"Object",
"removalKey",
")",
"{",
"HashMap",
"<",
"String",
",",
"RoleMappingImpl",
">",
"newRoles",
"=",
"new",
"HashMap",
"<",
"String",
",",
"RoleMappingImpl",
">",
"(",
"roleMappings",... | Undo a prior removal using the supplied undo key.
@param removalKey - The key returned from the call to removeRoleMapping.
@return true if the undo was successful, false otherwise. | [
"Undo",
"a",
"prior",
"removal",
"using",
"the",
"supplied",
"undo",
"key",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/access/management/WritableAuthorizerConfiguration.java#L213-L223 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/coordination/ServerOperationResolver.java | ServerOperationResolver.getDeploymentOverlayOperations | private Map<Set<ServerIdentity>, ModelNode> getDeploymentOverlayOperations(ModelNode operation,
ModelNode host) {
final PathAddress realAddress = PathAddress.pathAddress(operation.get(OP_ADDR));
if (realAddress.size() == 0 &&... | java | private Map<Set<ServerIdentity>, ModelNode> getDeploymentOverlayOperations(ModelNode operation,
ModelNode host) {
final PathAddress realAddress = PathAddress.pathAddress(operation.get(OP_ADDR));
if (realAddress.size() == 0 &&... | [
"private",
"Map",
"<",
"Set",
"<",
"ServerIdentity",
">",
",",
"ModelNode",
">",
"getDeploymentOverlayOperations",
"(",
"ModelNode",
"operation",
",",
"ModelNode",
"host",
")",
"{",
"final",
"PathAddress",
"realAddress",
"=",
"PathAddress",
".",
"pathAddress",
"("... | Convert an operation for deployment overlays to be executed on local servers.
Since this might be called in the case of redeployment of affected deployments, we need to take into account
the composite op resulting from such a transformation
@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain
@par... | [
"Convert",
"an",
"operation",
"for",
"deployment",
"overlays",
"to",
"be",
"executed",
"on",
"local",
"servers",
".",
"Since",
"this",
"might",
"be",
"called",
"in",
"the",
"case",
"of",
"redeployment",
"of",
"affected",
"deployments",
"we",
"need",
"to",
"t... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/coordination/ServerOperationResolver.java#L350-L384 | train |
wildfly/wildfly-core | cli/src/main/java/org/jboss/as/cli/gui/ServerLogsPanel.java | ServerLogsPanel.isLogDownloadAvailable | public static boolean isLogDownloadAvailable(CliGuiContext cliGuiCtx) {
ModelNode readOps = null;
try {
readOps = cliGuiCtx.getExecutor().doCommand("/subsystem=logging:read-children-types");
} catch (CommandFormatException | IOException e) {
return false;
}
... | java | public static boolean isLogDownloadAvailable(CliGuiContext cliGuiCtx) {
ModelNode readOps = null;
try {
readOps = cliGuiCtx.getExecutor().doCommand("/subsystem=logging:read-children-types");
} catch (CommandFormatException | IOException e) {
return false;
}
... | [
"public",
"static",
"boolean",
"isLogDownloadAvailable",
"(",
"CliGuiContext",
"cliGuiCtx",
")",
"{",
"ModelNode",
"readOps",
"=",
"null",
";",
"try",
"{",
"readOps",
"=",
"cliGuiCtx",
".",
"getExecutor",
"(",
")",
".",
"doCommand",
"(",
"\"/subsystem=logging:read... | Does the server support log downloads?
@param cliGuiCtx The context.
@return <code>true</code> if the server supports log downloads,
<code>false</code> otherwise. | [
"Does",
"the",
"server",
"support",
"log",
"downloads?"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/gui/ServerLogsPanel.java#L80-L92 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/interfaces/InetAddressUtil.java | InetAddressUtil.getLocalHost | public static InetAddress getLocalHost() throws UnknownHostException {
InetAddress addr;
try {
addr = InetAddress.getLocalHost();
} catch (ArrayIndexOutOfBoundsException e) { //this is workaround for mac osx bug see AS7-3223 and JGRP-1404
addr = InetAddress.getByName(nul... | java | public static InetAddress getLocalHost() throws UnknownHostException {
InetAddress addr;
try {
addr = InetAddress.getLocalHost();
} catch (ArrayIndexOutOfBoundsException e) { //this is workaround for mac osx bug see AS7-3223 and JGRP-1404
addr = InetAddress.getByName(nul... | [
"public",
"static",
"InetAddress",
"getLocalHost",
"(",
")",
"throws",
"UnknownHostException",
"{",
"InetAddress",
"addr",
";",
"try",
"{",
"addr",
"=",
"InetAddress",
".",
"getLocalHost",
"(",
")",
";",
"}",
"catch",
"(",
"ArrayIndexOutOfBoundsException",
"e",
... | Methods returns InetAddress for localhost
@return InetAddress of the localhost
@throws UnknownHostException if localhost could not be resolved | [
"Methods",
"returns",
"InetAddress",
"for",
"localhost"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/interfaces/InetAddressUtil.java#L44-L52 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java | ConfigurationFile.getBootFile | public File getBootFile() {
if (bootFile == null) {
synchronized (this) {
if (bootFile == null) {
if (bootFileReset) {
//Reset the done bootup and the sequence, so that the old file we are reloading from
// overwrite... | java | public File getBootFile() {
if (bootFile == null) {
synchronized (this) {
if (bootFile == null) {
if (bootFileReset) {
//Reset the done bootup and the sequence, so that the old file we are reloading from
// overwrite... | [
"public",
"File",
"getBootFile",
"(",
")",
"{",
"if",
"(",
"bootFile",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"bootFile",
"==",
"null",
")",
"{",
"if",
"(",
"bootFileReset",
")",
"{",
"//Reset the done bootup and the sequ... | Gets the file from which boot operations should be parsed.
@return the file. Will not be {@code null} | [
"Gets",
"the",
"file",
"from",
"which",
"boot",
"operations",
"should",
"be",
"parsed",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java#L217-L287 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java | ConfigurationFile.successfulBoot | void successfulBoot() throws ConfigurationPersistenceException {
synchronized (this) {
if (doneBootup.get()) {
return;
}
final File copySource;
if (!interactionPolicy.isReadOnly()) {
copySource = mainFile;
} else {
... | java | void successfulBoot() throws ConfigurationPersistenceException {
synchronized (this) {
if (doneBootup.get()) {
return;
}
final File copySource;
if (!interactionPolicy.isReadOnly()) {
copySource = mainFile;
} else {
... | [
"void",
"successfulBoot",
"(",
")",
"throws",
"ConfigurationPersistenceException",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"doneBootup",
".",
"get",
"(",
")",
")",
"{",
"return",
";",
"}",
"final",
"File",
"copySource",
";",
"if",
"(",
"!",
... | Notification that boot has completed successfully and the configuration history should be updated | [
"Notification",
"that",
"boot",
"has",
"completed",
"successfully",
"and",
"the",
"configuration",
"history",
"should",
"be",
"updated"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java#L483-L533 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java | ConfigurationFile.backup | void backup() throws ConfigurationPersistenceException {
if (!doneBootup.get()) {
return;
}
try {
if (!interactionPolicy.isReadOnly()) {
//Move the main file to the versioned history
moveFile(mainFile, getVersionedFile(mainFile));
... | java | void backup() throws ConfigurationPersistenceException {
if (!doneBootup.get()) {
return;
}
try {
if (!interactionPolicy.isReadOnly()) {
//Move the main file to the versioned history
moveFile(mainFile, getVersionedFile(mainFile));
... | [
"void",
"backup",
"(",
")",
"throws",
"ConfigurationPersistenceException",
"{",
"if",
"(",
"!",
"doneBootup",
".",
"get",
"(",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"if",
"(",
"!",
"interactionPolicy",
".",
"isReadOnly",
"(",
")",
")",
"{",
"/... | Backup the current version of the configuration to the versioned configuration history | [
"Backup",
"the",
"current",
"version",
"of",
"the",
"configuration",
"to",
"the",
"versioned",
"configuration",
"history"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java#L537-L564 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java | ConfigurationFile.commitTempFile | void commitTempFile(File temp) throws ConfigurationPersistenceException {
if (!doneBootup.get()) {
return;
}
if (!interactionPolicy.isReadOnly()) {
FilePersistenceUtils.moveTempFileToMain(temp, mainFile);
} else {
FilePersistenceUtils.moveTempFileToMai... | java | void commitTempFile(File temp) throws ConfigurationPersistenceException {
if (!doneBootup.get()) {
return;
}
if (!interactionPolicy.isReadOnly()) {
FilePersistenceUtils.moveTempFileToMain(temp, mainFile);
} else {
FilePersistenceUtils.moveTempFileToMai... | [
"void",
"commitTempFile",
"(",
"File",
"temp",
")",
"throws",
"ConfigurationPersistenceException",
"{",
"if",
"(",
"!",
"doneBootup",
".",
"get",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"interactionPolicy",
".",
"isReadOnly",
"(",
")",
")",... | Commit the contents of the given temp file to either the main file, or, if we are not persisting
to the main file, to the .last file in the configuration history
@param temp temp file containing the latest configuration. Will not be {@code null}
@throws ConfigurationPersistenceException | [
"Commit",
"the",
"contents",
"of",
"the",
"given",
"temp",
"file",
"to",
"either",
"the",
"main",
"file",
"or",
"if",
"we",
"are",
"not",
"persisting",
"to",
"the",
"main",
"file",
"to",
"the",
".",
"last",
"file",
"in",
"the",
"configuration",
"history"... | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java#L572-L581 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java | ConfigurationFile.fileWritten | void fileWritten() throws ConfigurationPersistenceException {
if (!doneBootup.get() || interactionPolicy.isReadOnly()) {
return;
}
try {
FilePersistenceUtils.copyFile(mainFile, lastFile);
} catch (IOException e) {
throw ControllerLogger.ROOT_LOGGER.fai... | java | void fileWritten() throws ConfigurationPersistenceException {
if (!doneBootup.get() || interactionPolicy.isReadOnly()) {
return;
}
try {
FilePersistenceUtils.copyFile(mainFile, lastFile);
} catch (IOException e) {
throw ControllerLogger.ROOT_LOGGER.fai... | [
"void",
"fileWritten",
"(",
")",
"throws",
"ConfigurationPersistenceException",
"{",
"if",
"(",
"!",
"doneBootup",
".",
"get",
"(",
")",
"||",
"interactionPolicy",
".",
"isReadOnly",
"(",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"FilePersistenceUtils",
... | Notification that the configuration has been written, and its current content should be stored to the .last file | [
"Notification",
"that",
"the",
"configuration",
"has",
"been",
"written",
"and",
"its",
"current",
"content",
"should",
"be",
"stored",
"to",
"the",
".",
"last",
"file"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java#L584-L593 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java | ConfigurationFile.deleteRecursive | private void deleteRecursive(final File file) {
if (file.isDirectory()) {
final String[] files = file.list();
if (files != null) {
for (String name : files) {
deleteRecursive(new File(file, name));
}
}
}
if ... | java | private void deleteRecursive(final File file) {
if (file.isDirectory()) {
final String[] files = file.list();
if (files != null) {
for (String name : files) {
deleteRecursive(new File(file, name));
}
}
}
if ... | [
"private",
"void",
"deleteRecursive",
"(",
"final",
"File",
"file",
")",
"{",
"if",
"(",
"file",
".",
"isDirectory",
"(",
")",
")",
"{",
"final",
"String",
"[",
"]",
"files",
"=",
"file",
".",
"list",
"(",
")",
";",
"if",
"(",
"files",
"!=",
"null"... | note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot | [
"note",
"this",
"just",
"logs",
"an",
"error",
"and",
"doesn",
"t",
"throw",
"as",
"its",
"only",
"used",
"to",
"remove",
"old",
"configuration",
"files",
"and",
"shouldn",
"t",
"stop",
"boot"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java#L714-L727 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/RestartParentResourceRemoveHandler.java | RestartParentResourceRemoveHandler.updateModel | protected void updateModel(final OperationContext context, final ModelNode operation) throws OperationFailedException {
// verify that the resource exist before removing it
context.readResource(PathAddress.EMPTY_ADDRESS, false);
Resource resource = context.removeResource(PathAddress.EMPTY_ADDRES... | java | protected void updateModel(final OperationContext context, final ModelNode operation) throws OperationFailedException {
// verify that the resource exist before removing it
context.readResource(PathAddress.EMPTY_ADDRESS, false);
Resource resource = context.removeResource(PathAddress.EMPTY_ADDRES... | [
"protected",
"void",
"updateModel",
"(",
"final",
"OperationContext",
"context",
",",
"final",
"ModelNode",
"operation",
")",
"throws",
"OperationFailedException",
"{",
"// verify that the resource exist before removing it",
"context",
".",
"readResource",
"(",
"PathAddress",... | Performs the update to the persistent configuration model. This default implementation simply removes
the targeted resource.
@param context the operation context
@param operation the operation
@throws OperationFailedException if there is a problem updating the model | [
"Performs",
"the",
"update",
"to",
"the",
"persistent",
"configuration",
"model",
".",
"This",
"default",
"implementation",
"simply",
"removes",
"the",
"targeted",
"resource",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/RestartParentResourceRemoveHandler.java#L62-L67 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java | AbstractOperationContext.executeOperation | ResultAction executeOperation() {
assert isControllingThread();
try {
/** Execution has begun */
executing = true;
processStages();
if (resultAction == ResultAction.KEEP) {
report(MessageSeverity.INFO, ControllerLogger.ROOT_LOGGER.operat... | java | ResultAction executeOperation() {
assert isControllingThread();
try {
/** Execution has begun */
executing = true;
processStages();
if (resultAction == ResultAction.KEEP) {
report(MessageSeverity.INFO, ControllerLogger.ROOT_LOGGER.operat... | [
"ResultAction",
"executeOperation",
"(",
")",
"{",
"assert",
"isControllingThread",
"(",
")",
";",
"try",
"{",
"/** Execution has begun */",
"executing",
"=",
"true",
";",
"processStages",
"(",
")",
";",
"if",
"(",
"resultAction",
"==",
"ResultAction",
".",
"KEE... | Package-protected method used to initiate operation execution.
@return the result action | [
"Package",
"-",
"protected",
"method",
"used",
"to",
"initiate",
"operation",
"execution",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java#L460-L499 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java | AbstractOperationContext.logAuditRecord | void logAuditRecord() {
trackConfigurationChange();
if (!auditLogged) {
try {
AccessAuditContext accessContext = SecurityActions.currentAccessAuditContext();
Caller caller = getCaller();
auditLogger.log(
isReadOnly(),
... | java | void logAuditRecord() {
trackConfigurationChange();
if (!auditLogged) {
try {
AccessAuditContext accessContext = SecurityActions.currentAccessAuditContext();
Caller caller = getCaller();
auditLogger.log(
isReadOnly(),
... | [
"void",
"logAuditRecord",
"(",
")",
"{",
"trackConfigurationChange",
"(",
")",
";",
"if",
"(",
"!",
"auditLogged",
")",
"{",
"try",
"{",
"AccessAuditContext",
"accessContext",
"=",
"SecurityActions",
".",
"currentAccessAuditContext",
"(",
")",
";",
"Caller",
"ca... | Log an audit record of this operation. | [
"Log",
"an",
"audit",
"record",
"of",
"this",
"operation",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java#L621-L641 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java | AbstractOperationContext.processStages | private void processStages() {
// Locate the next step to execute.
ModelNode primaryResponse = null;
Step step;
do {
step = steps.get(currentStage).pollFirst();
if (step == null) {
if (currentStage == Stage.MODEL && addModelValidationSteps()) {
... | java | private void processStages() {
// Locate the next step to execute.
ModelNode primaryResponse = null;
Step step;
do {
step = steps.get(currentStage).pollFirst();
if (step == null) {
if (currentStage == Stage.MODEL && addModelValidationSteps()) {
... | [
"private",
"void",
"processStages",
"(",
")",
"{",
"// Locate the next step to execute.",
"ModelNode",
"primaryResponse",
"=",
"null",
";",
"Step",
"step",
";",
"do",
"{",
"step",
"=",
"steps",
".",
"get",
"(",
"currentStage",
")",
".",
"pollFirst",
"(",
")",
... | Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage. | [
"Perform",
"the",
"work",
"of",
"processing",
"the",
"various",
"OperationContext",
".",
"Stage",
"queues",
"and",
"then",
"the",
"DONE",
"stage",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java#L687-L770 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java | AbstractOperationContext.checkUndefinedNotification | private void checkUndefinedNotification(Notification notification) {
String type = notification.getType();
PathAddress source = notification.getSource();
Map<String, NotificationEntry> descriptions = getRootResourceRegistration().getNotificationDescriptions(source, true);
if (!descriptio... | java | private void checkUndefinedNotification(Notification notification) {
String type = notification.getType();
PathAddress source = notification.getSource();
Map<String, NotificationEntry> descriptions = getRootResourceRegistration().getNotificationDescriptions(source, true);
if (!descriptio... | [
"private",
"void",
"checkUndefinedNotification",
"(",
"Notification",
"notification",
")",
"{",
"String",
"type",
"=",
"notification",
".",
"getType",
"(",
")",
";",
"PathAddress",
"source",
"=",
"notification",
".",
"getSource",
"(",
")",
";",
"Map",
"<",
"St... | Check that each emitted notification is properly described by its source. | [
"Check",
"that",
"each",
"emitted",
"notification",
"is",
"properly",
"described",
"by",
"its",
"source",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java#L939-L946 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java | AbstractOperationContext.getFailedResultAction | private ResultAction getFailedResultAction(Throwable cause) {
if (currentStage == Stage.MODEL || cancelled || isRollbackOnRuntimeFailure() || isRollbackOnly()
|| (cause != null && !(cause instanceof OperationFailedException))) {
return ResultAction.ROLLBACK;
}
return ... | java | private ResultAction getFailedResultAction(Throwable cause) {
if (currentStage == Stage.MODEL || cancelled || isRollbackOnRuntimeFailure() || isRollbackOnly()
|| (cause != null && !(cause instanceof OperationFailedException))) {
return ResultAction.ROLLBACK;
}
return ... | [
"private",
"ResultAction",
"getFailedResultAction",
"(",
"Throwable",
"cause",
")",
"{",
"if",
"(",
"currentStage",
"==",
"Stage",
".",
"MODEL",
"||",
"cancelled",
"||",
"isRollbackOnRuntimeFailure",
"(",
")",
"||",
"isRollbackOnly",
"(",
")",
"||",
"(",
"cause"... | Decide whether failure should trigger a rollback.
@param cause
the cause of the failure, or {@code null} if failure is not
the result of catching a throwable
@return the result action | [
"Decide",
"whether",
"failure",
"should",
"trigger",
"a",
"rollback",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java#L1117-L1123 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/plan/ServerUpdatePolicy.java | ServerUpdatePolicy.canUpdateServer | public boolean canUpdateServer(ServerIdentity server) {
if (!serverGroupName.equals(server.getServerGroupName()) || !servers.contains(server)) {
throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServer(server);
}
if (!parent.canChildProceed())
return false;
... | java | public boolean canUpdateServer(ServerIdentity server) {
if (!serverGroupName.equals(server.getServerGroupName()) || !servers.contains(server)) {
throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServer(server);
}
if (!parent.canChildProceed())
return false;
... | [
"public",
"boolean",
"canUpdateServer",
"(",
"ServerIdentity",
"server",
")",
"{",
"if",
"(",
"!",
"serverGroupName",
".",
"equals",
"(",
"server",
".",
"getServerGroupName",
"(",
")",
")",
"||",
"!",
"servers",
".",
"contains",
"(",
"server",
")",
")",
"{... | Gets whether the given server can be updated.
@param server the id of the server. Cannot be <code>null</code>
@return <code>true</code> if the server can be updated; <code>false</code>
if the update should be cancelled
@throws IllegalStateException if this policy is not expecting a request
to update the given server | [
"Gets",
"whether",
"the",
"given",
"server",
"can",
"be",
"updated",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/plan/ServerUpdatePolicy.java#L111-L122 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/plan/ServerUpdatePolicy.java | ServerUpdatePolicy.recordServerResult | public void recordServerResult(ServerIdentity server, ModelNode response) {
if (!serverGroupName.equals(server.getServerGroupName()) || !servers.contains(server)) {
throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServer(server);
}
boolean serverFailed = response.has(FAIL... | java | public void recordServerResult(ServerIdentity server, ModelNode response) {
if (!serverGroupName.equals(server.getServerGroupName()) || !servers.contains(server)) {
throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServer(server);
}
boolean serverFailed = response.has(FAIL... | [
"public",
"void",
"recordServerResult",
"(",
"ServerIdentity",
"server",
",",
"ModelNode",
"response",
")",
"{",
"if",
"(",
"!",
"serverGroupName",
".",
"equals",
"(",
"server",
".",
"getServerGroupName",
"(",
")",
")",
"||",
"!",
"servers",
".",
"contains",
... | Records the result of updating a server.
@param server the id of the server. Cannot be <code>null</code>
@param response the result of the updates | [
"Records",
"the",
"result",
"of",
"updating",
"a",
"server",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/plan/ServerUpdatePolicy.java#L130-L160 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/Arguments.java | Arguments.set | public void set(final Argument argument) {
if (argument != null) {
map.put(argument.getKey(), Collections.singleton(argument));
}
} | java | public void set(final Argument argument) {
if (argument != null) {
map.put(argument.getKey(), Collections.singleton(argument));
}
} | [
"public",
"void",
"set",
"(",
"final",
"Argument",
"argument",
")",
"{",
"if",
"(",
"argument",
"!=",
"null",
")",
"{",
"map",
".",
"put",
"(",
"argument",
".",
"getKey",
"(",
")",
",",
"Collections",
".",
"singleton",
"(",
"argument",
")",
")",
";",... | Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the
argument key.
@param argument the argument to add | [
"Sets",
"an",
"argument",
"to",
"the",
"collection",
"of",
"arguments",
".",
"This",
"guarantees",
"only",
"one",
"value",
"will",
"be",
"assigned",
"to",
"the",
"argument",
"key",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/Arguments.java#L126-L130 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/Arguments.java | Arguments.get | public String get(final String key) {
final Collection<Argument> args = map.get(key);
if (args != null) {
return args.iterator().hasNext() ? args.iterator().next().getValue() : null;
}
return null;
} | java | public String get(final String key) {
final Collection<Argument> args = map.get(key);
if (args != null) {
return args.iterator().hasNext() ? args.iterator().next().getValue() : null;
}
return null;
} | [
"public",
"String",
"get",
"(",
"final",
"String",
"key",
")",
"{",
"final",
"Collection",
"<",
"Argument",
">",
"args",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"args",
"!=",
"null",
")",
"{",
"return",
"args",
".",
"iterator",
"("... | Gets the first value for the key.
@param key the key to check for the value
@return the value or {@code null} if the key is not found or the value was {@code null} | [
"Gets",
"the",
"first",
"value",
"for",
"the",
"key",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/Arguments.java#L154-L160 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/Arguments.java | Arguments.getArguments | public Collection<Argument> getArguments(final String key) {
final Collection<Argument> args = map.get(key);
if (args != null) {
return new ArrayList<>(args);
}
return Collections.emptyList();
} | java | public Collection<Argument> getArguments(final String key) {
final Collection<Argument> args = map.get(key);
if (args != null) {
return new ArrayList<>(args);
}
return Collections.emptyList();
} | [
"public",
"Collection",
"<",
"Argument",
">",
"getArguments",
"(",
"final",
"String",
"key",
")",
"{",
"final",
"Collection",
"<",
"Argument",
">",
"args",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"args",
"!=",
"null",
")",
"{",
"retu... | Gets the value for the key.
@param key the key to check for the value
@return the value or an empty collection if no values were set | [
"Gets",
"the",
"value",
"for",
"the",
"key",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/Arguments.java#L169-L175 | train |
wildfly/wildfly-core | launcher/src/main/java/org/wildfly/core/launcher/Arguments.java | Arguments.asList | public List<String> asList() {
final List<String> result = new ArrayList<>();
for (Collection<Argument> args : map.values()) {
for (Argument arg : args) {
result.add(arg.asCommandLineArgument());
}
}
return result;
} | java | public List<String> asList() {
final List<String> result = new ArrayList<>();
for (Collection<Argument> args : map.values()) {
for (Argument arg : args) {
result.add(arg.asCommandLineArgument());
}
}
return result;
} | [
"public",
"List",
"<",
"String",
">",
"asList",
"(",
")",
"{",
"final",
"List",
"<",
"String",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Collection",
"<",
"Argument",
">",
"args",
":",
"map",
".",
"values",
"(",
")",... | Returns the arguments as a list in their command line form.
@return the arguments for the command line | [
"Returns",
"the",
"arguments",
"as",
"a",
"list",
"in",
"their",
"command",
"line",
"form",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/launcher/src/main/java/org/wildfly/core/launcher/Arguments.java#L193-L201 | train |
wildfly/wildfly-core | domain-management/src/main/java/org/jboss/as/domain/management/parsing/ManagementXml_Legacy.java | ManagementXml_Legacy.parseLdapAuthorization_1_5 | private void parseLdapAuthorization_1_5(final XMLExtendedStreamReader reader,
final ModelNode realmAddress, final List<ModelNode> list) throws XMLStreamException {
ModelNode addr = realmAddress.clone().add(AUTHORIZATION, LDAP);
ModelNode ldapAuthorization = Util.getEmptyOperation(ADD, addr);... | java | private void parseLdapAuthorization_1_5(final XMLExtendedStreamReader reader,
final ModelNode realmAddress, final List<ModelNode> list) throws XMLStreamException {
ModelNode addr = realmAddress.clone().add(AUTHORIZATION, LDAP);
ModelNode ldapAuthorization = Util.getEmptyOperation(ADD, addr);... | [
"private",
"void",
"parseLdapAuthorization_1_5",
"(",
"final",
"XMLExtendedStreamReader",
"reader",
",",
"final",
"ModelNode",
"realmAddress",
",",
"final",
"List",
"<",
"ModelNode",
">",
"list",
")",
"throws",
"XMLStreamException",
"{",
"ModelNode",
"addr",
"=",
"r... | 1.5 and on, 2.0 and on, 3.0 and on. | [
"1",
".",
"5",
"and",
"on",
"2",
".",
"0",
"and",
"on",
"3",
".",
"0",
"and",
"on",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/parsing/ManagementXml_Legacy.java#L2443-L2512 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/module/ResourceRoot.java | ResourceRoot.merge | public void merge(final ResourceRoot additionalResourceRoot) {
if(!additionalResourceRoot.getRoot().equals(root)) {
throw ServerLogger.ROOT_LOGGER.cannotMergeResourceRoot(root, additionalResourceRoot.getRoot());
}
usePhysicalCodeSource = additionalResourceRoot.usePhysicalCodeSource;
... | java | public void merge(final ResourceRoot additionalResourceRoot) {
if(!additionalResourceRoot.getRoot().equals(root)) {
throw ServerLogger.ROOT_LOGGER.cannotMergeResourceRoot(root, additionalResourceRoot.getRoot());
}
usePhysicalCodeSource = additionalResourceRoot.usePhysicalCodeSource;
... | [
"public",
"void",
"merge",
"(",
"final",
"ResourceRoot",
"additionalResourceRoot",
")",
"{",
"if",
"(",
"!",
"additionalResourceRoot",
".",
"getRoot",
"(",
")",
".",
"equals",
"(",
"root",
")",
")",
"{",
"throw",
"ServerLogger",
".",
"ROOT_LOGGER",
".",
"can... | Merges information from the resource root into this resource root
@param additionalResourceRoot The root to merge | [
"Merges",
"information",
"from",
"the",
"resource",
"root",
"into",
"this",
"resource",
"root"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/module/ResourceRoot.java#L94-L106 | train |
wildfly/wildfly-core | security-manager/src/main/java/org/wildfly/extension/security/manager/SecurityManagerExtensionTransformerRegistration.java | SecurityManagerExtensionTransformerRegistration.registerTransformers | @Override
public void registerTransformers(SubsystemTransformerRegistration subsystemRegistration) {
ResourceTransformationDescriptionBuilder builder = ResourceTransformationDescriptionBuilder.Factory.createSubsystemInstance();
builder.addChildResource(DeploymentPermissionsResourceDefinition.DEPLOYM... | java | @Override
public void registerTransformers(SubsystemTransformerRegistration subsystemRegistration) {
ResourceTransformationDescriptionBuilder builder = ResourceTransformationDescriptionBuilder.Factory.createSubsystemInstance();
builder.addChildResource(DeploymentPermissionsResourceDefinition.DEPLOYM... | [
"@",
"Override",
"public",
"void",
"registerTransformers",
"(",
"SubsystemTransformerRegistration",
"subsystemRegistration",
")",
"{",
"ResourceTransformationDescriptionBuilder",
"builder",
"=",
"ResourceTransformationDescriptionBuilder",
".",
"Factory",
".",
"createSubsystemInstan... | Registers the transformers for JBoss EAP 7.0.0.
@param subsystemRegistration contains data about the subsystem registration | [
"Registers",
"the",
"transformers",
"for",
"JBoss",
"EAP",
"7",
".",
"0",
".",
"0",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/security-manager/src/main/java/org/wildfly/extension/security/manager/SecurityManagerExtensionTransformerRegistration.java#L50-L70 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/operations/global/FilteredData.java | FilteredData.toModelNode | ModelNode toModelNode() {
ModelNode result = null;
if (map != null) {
result = new ModelNode();
for (Map.Entry<PathAddress, ResourceData> entry : map.entrySet()) {
ModelNode item = new ModelNode();
PathAddress pa = entry.getKey();
i... | java | ModelNode toModelNode() {
ModelNode result = null;
if (map != null) {
result = new ModelNode();
for (Map.Entry<PathAddress, ResourceData> entry : map.entrySet()) {
ModelNode item = new ModelNode();
PathAddress pa = entry.getKey();
i... | [
"ModelNode",
"toModelNode",
"(",
")",
"{",
"ModelNode",
"result",
"=",
"null",
";",
"if",
"(",
"map",
"!=",
"null",
")",
"{",
"result",
"=",
"new",
"ModelNode",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"PathAddress",
",",
"ResourceData",
... | Report on the filtered data in DMR . | [
"Report",
"on",
"the",
"filtered",
"data",
"in",
"DMR",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/operations/global/FilteredData.java#L107-L151 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java | IdentityPatchRunner.rollbackLast | public PatchingResult rollbackLast(final ContentVerificationPolicy contentPolicy, final boolean resetConfiguration, InstallationManager.InstallationModification modification) throws PatchingException {
// Determine the patch id to rollback
String patchId;
final List<String> oneOffs = modificati... | java | public PatchingResult rollbackLast(final ContentVerificationPolicy contentPolicy, final boolean resetConfiguration, InstallationManager.InstallationModification modification) throws PatchingException {
// Determine the patch id to rollback
String patchId;
final List<String> oneOffs = modificati... | [
"public",
"PatchingResult",
"rollbackLast",
"(",
"final",
"ContentVerificationPolicy",
"contentPolicy",
",",
"final",
"boolean",
"resetConfiguration",
",",
"InstallationManager",
".",
"InstallationModification",
"modification",
")",
"throws",
"PatchingException",
"{",
"// Det... | Rollback the last applied patch.
@param contentPolicy the content policy
@param resetConfiguration whether to reset the configuration
@param modification the installation modification
@return the patching result
@throws PatchingException | [
"Rollback",
"the",
"last",
"applied",
"patch",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L284-L298 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java | IdentityPatchRunner.restoreFromHistory | static void restoreFromHistory(final InstallationManager.MutablePatchingTarget target, final String rollbackPatchId,
final Patch.PatchType patchType, final PatchableTarget.TargetInfo history) throws PatchingException {
if (patchType == Patch.PatchType.CUMULATIVE) {
... | java | static void restoreFromHistory(final InstallationManager.MutablePatchingTarget target, final String rollbackPatchId,
final Patch.PatchType patchType, final PatchableTarget.TargetInfo history) throws PatchingException {
if (patchType == Patch.PatchType.CUMULATIVE) {
... | [
"static",
"void",
"restoreFromHistory",
"(",
"final",
"InstallationManager",
".",
"MutablePatchingTarget",
"target",
",",
"final",
"String",
"rollbackPatchId",
",",
"final",
"Patch",
".",
"PatchType",
"patchType",
",",
"final",
"PatchableTarget",
".",
"TargetInfo",
"h... | Restore the recorded state from the rollback xml.
@param target the patchable target
@param rollbackPatchId the rollback patch id
@param patchType the the current patch type
@param history the recorded history
@throws PatchingException | [
"Restore",
"the",
"recorded",
"state",
"from",
"the",
"rollback",
"xml",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L425-L438 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java | IdentityPatchRunner.portForward | void portForward(final Patch patch, IdentityPatchContext context) throws PatchingException, IOException, XMLStreamException {
assert patch.getIdentity().getPatchType() == Patch.PatchType.CUMULATIVE;
final PatchingHistory history = context.getHistory();
for (final PatchElement element : patch.ge... | java | void portForward(final Patch patch, IdentityPatchContext context) throws PatchingException, IOException, XMLStreamException {
assert patch.getIdentity().getPatchType() == Patch.PatchType.CUMULATIVE;
final PatchingHistory history = context.getHistory();
for (final PatchElement element : patch.ge... | [
"void",
"portForward",
"(",
"final",
"Patch",
"patch",
",",
"IdentityPatchContext",
"context",
")",
"throws",
"PatchingException",
",",
"IOException",
",",
"XMLStreamException",
"{",
"assert",
"patch",
".",
"getIdentity",
"(",
")",
".",
"getPatchType",
"(",
")",
... | Port forward missing module changes for each layer.
@param patch the current patch
@param context the patch context
@throws PatchingException
@throws IOException
@throws XMLStreamException | [
"Port",
"forward",
"missing",
"module",
"changes",
"for",
"each",
"layer",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L563-L610 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java | IdentityPatchRunner.executeTasks | static PatchingResult executeTasks(final IdentityPatchContext context, final IdentityPatchContext.FinalizeCallback callback) throws Exception {
final List<PreparedTask> tasks = new ArrayList<PreparedTask>();
final List<ContentItem> conflicts = new ArrayList<ContentItem>();
// Identity
pr... | java | static PatchingResult executeTasks(final IdentityPatchContext context, final IdentityPatchContext.FinalizeCallback callback) throws Exception {
final List<PreparedTask> tasks = new ArrayList<PreparedTask>();
final List<ContentItem> conflicts = new ArrayList<ContentItem>();
// Identity
pr... | [
"static",
"PatchingResult",
"executeTasks",
"(",
"final",
"IdentityPatchContext",
"context",
",",
"final",
"IdentityPatchContext",
".",
"FinalizeCallback",
"callback",
")",
"throws",
"Exception",
"{",
"final",
"List",
"<",
"PreparedTask",
">",
"tasks",
"=",
"new",
"... | Execute all recorded tasks.
@param context the patch context
@param callback the finalization callback
@throws Exception | [
"Execute",
"all",
"recorded",
"tasks",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L630-L658 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java | IdentityPatchRunner.prepareTasks | static void prepareTasks(final IdentityPatchContext.PatchEntry entry, final IdentityPatchContext context, final List<PreparedTask> tasks, final List<ContentItem> conflicts) throws PatchingException {
for (final PatchingTasks.ContentTaskDefinition definition : entry.getTaskDefinitions()) {
final Patc... | java | static void prepareTasks(final IdentityPatchContext.PatchEntry entry, final IdentityPatchContext context, final List<PreparedTask> tasks, final List<ContentItem> conflicts) throws PatchingException {
for (final PatchingTasks.ContentTaskDefinition definition : entry.getTaskDefinitions()) {
final Patc... | [
"static",
"void",
"prepareTasks",
"(",
"final",
"IdentityPatchContext",
".",
"PatchEntry",
"entry",
",",
"final",
"IdentityPatchContext",
"context",
",",
"final",
"List",
"<",
"PreparedTask",
">",
"tasks",
",",
"final",
"List",
"<",
"ContentItem",
">",
"conflicts"... | Prepare all tasks.
@param entry the patch entry
@param context the patch context
@param tasks a list for prepared tasks
@param conflicts a list for conflicting content items
@throws PatchingException | [
"Prepare",
"all",
"tasks",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L669-L689 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java | IdentityPatchRunner.createTask | static PatchingTask createTask(final PatchingTasks.ContentTaskDefinition definition, final PatchContentProvider provider, final IdentityPatchContext.PatchEntry context) {
final PatchContentLoader contentLoader = provider.getLoader(definition.getTarget().getPatchId());
final PatchingTaskDescription descr... | java | static PatchingTask createTask(final PatchingTasks.ContentTaskDefinition definition, final PatchContentProvider provider, final IdentityPatchContext.PatchEntry context) {
final PatchContentLoader contentLoader = provider.getLoader(definition.getTarget().getPatchId());
final PatchingTaskDescription descr... | [
"static",
"PatchingTask",
"createTask",
"(",
"final",
"PatchingTasks",
".",
"ContentTaskDefinition",
"definition",
",",
"final",
"PatchContentProvider",
"provider",
",",
"final",
"IdentityPatchContext",
".",
"PatchEntry",
"context",
")",
"{",
"final",
"PatchContentLoader"... | Create the patching task based on the definition.
@param definition the task description
@param provider the content provider
@param context the task context
@return the created task | [
"Create",
"the",
"patching",
"task",
"based",
"on",
"the",
"definition",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L699-L703 | train |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java | IdentityPatchRunner.checkUpgradeConditions | static void checkUpgradeConditions(final UpgradeCondition condition, final InstallationManager.MutablePatchingTarget target) throws PatchingException {
// See if the prerequisites are met
for (final String required : condition.getRequires()) {
if (!target.isApplied(required)) {
... | java | static void checkUpgradeConditions(final UpgradeCondition condition, final InstallationManager.MutablePatchingTarget target) throws PatchingException {
// See if the prerequisites are met
for (final String required : condition.getRequires()) {
if (!target.isApplied(required)) {
... | [
"static",
"void",
"checkUpgradeConditions",
"(",
"final",
"UpgradeCondition",
"condition",
",",
"final",
"InstallationManager",
".",
"MutablePatchingTarget",
"target",
")",
"throws",
"PatchingException",
"{",
"// See if the prerequisites are met",
"for",
"(",
"final",
"Stri... | Check whether the patch can be applied to a given target.
@param condition the conditions
@param target the target
@throws PatchingException | [
"Check",
"whether",
"the",
"patch",
"can",
"be",
"applied",
"to",
"a",
"given",
"target",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L769-L782 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/discovery/S3Util.java | S3Util.domainControllerDataFromByteBuffer | public static List<DomainControllerData> domainControllerDataFromByteBuffer(byte[] buffer) throws Exception {
List<DomainControllerData> retval = new ArrayList<DomainControllerData>();
if (buffer == null) {
return retval;
}
ByteArrayInputStream in_stream = new ByteArrayInputS... | java | public static List<DomainControllerData> domainControllerDataFromByteBuffer(byte[] buffer) throws Exception {
List<DomainControllerData> retval = new ArrayList<DomainControllerData>();
if (buffer == null) {
return retval;
}
ByteArrayInputStream in_stream = new ByteArrayInputS... | [
"public",
"static",
"List",
"<",
"DomainControllerData",
">",
"domainControllerDataFromByteBuffer",
"(",
"byte",
"[",
"]",
"buffer",
")",
"throws",
"Exception",
"{",
"List",
"<",
"DomainControllerData",
">",
"retval",
"=",
"new",
"ArrayList",
"<",
"DomainControllerD... | Get the domain controller data from the given byte buffer.
@param buffer the byte buffer
@return the domain controller data
@throws Exception | [
"Get",
"the",
"domain",
"controller",
"data",
"from",
"the",
"given",
"byte",
"buffer",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/discovery/S3Util.java#L83-L103 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/discovery/S3Util.java | S3Util.domainControllerDataToByteBuffer | public static byte[] domainControllerDataToByteBuffer(List<DomainControllerData> data) throws Exception {
final ByteArrayOutputStream out_stream = new ByteArrayOutputStream(512);
byte[] result;
try (DataOutputStream out = new DataOutputStream(out_stream)) {
Iterator<DomainControllerD... | java | public static byte[] domainControllerDataToByteBuffer(List<DomainControllerData> data) throws Exception {
final ByteArrayOutputStream out_stream = new ByteArrayOutputStream(512);
byte[] result;
try (DataOutputStream out = new DataOutputStream(out_stream)) {
Iterator<DomainControllerD... | [
"public",
"static",
"byte",
"[",
"]",
"domainControllerDataToByteBuffer",
"(",
"List",
"<",
"DomainControllerData",
">",
"data",
")",
"throws",
"Exception",
"{",
"final",
"ByteArrayOutputStream",
"out_stream",
"=",
"new",
"ByteArrayOutputStream",
"(",
"512",
")",
";... | Write the domain controller data to a byte buffer.
@param data the domain controller data
@return the byte buffer
@throws Exception | [
"Write",
"the",
"domain",
"controller",
"data",
"to",
"a",
"byte",
"buffer",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/discovery/S3Util.java#L112-L127 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/plan/ConcurrentGroupServerUpdatePolicy.java | ConcurrentGroupServerUpdatePolicy.canSuccessorProceed | private boolean canSuccessorProceed() {
if (predecessor != null && !predecessor.canSuccessorProceed()) {
return false;
}
synchronized (this) {
while (responseCount < groups.size()) {
try {
wait();
} catch (InterruptedE... | java | private boolean canSuccessorProceed() {
if (predecessor != null && !predecessor.canSuccessorProceed()) {
return false;
}
synchronized (this) {
while (responseCount < groups.size()) {
try {
wait();
} catch (InterruptedE... | [
"private",
"boolean",
"canSuccessorProceed",
"(",
")",
"{",
"if",
"(",
"predecessor",
"!=",
"null",
"&&",
"!",
"predecessor",
".",
"canSuccessorProceed",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"synchronized",
"(",
"this",
")",
"{",
"while",
"(",
... | Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to
execute once this policy's plans are successfully completed.
@return <code>true</code> if the successor can proceed | [
"Check",
"from",
"another",
"ConcurrentGroupServerUpdatePolicy",
"whose",
"plans",
"are",
"meant",
"to",
"execute",
"once",
"this",
"policy",
"s",
"plans",
"are",
"successfully",
"completed",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/plan/ConcurrentGroupServerUpdatePolicy.java#L64-L81 | train |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/plan/ConcurrentGroupServerUpdatePolicy.java | ConcurrentGroupServerUpdatePolicy.recordServerGroupResult | public void recordServerGroupResult(final String serverGroup, final boolean failed) {
synchronized (this) {
if (groups.contains(serverGroup)) {
responseCount++;
if (failed) {
this.failed = true;
}
DomainControllerLo... | java | public void recordServerGroupResult(final String serverGroup, final boolean failed) {
synchronized (this) {
if (groups.contains(serverGroup)) {
responseCount++;
if (failed) {
this.failed = true;
}
DomainControllerLo... | [
"public",
"void",
"recordServerGroupResult",
"(",
"final",
"String",
"serverGroup",
",",
"final",
"boolean",
"failed",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"groups",
".",
"contains",
"(",
"serverGroup",
")",
")",
"{",
"responseCount",
... | Records the result of updating a server group.
@param serverGroup the server group's name. Cannot be <code>null</code>
@param failed <code>true</code> if the server group update failed;
<code>false</code> if it succeeded | [
"Records",
"the",
"result",
"of",
"updating",
"a",
"server",
"group",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/plan/ConcurrentGroupServerUpdatePolicy.java#L100-L116 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java | ModelControllerImpl.executeReadOnlyOperation | @SuppressWarnings("deprecation")
protected ModelNode executeReadOnlyOperation(final ModelNode operation, final OperationMessageHandler handler, final OperationTransactionControl control, final OperationStepHandler prepareStep, final int operationId) {
final AbstractOperationContext delegateContext = getDele... | java | @SuppressWarnings("deprecation")
protected ModelNode executeReadOnlyOperation(final ModelNode operation, final OperationMessageHandler handler, final OperationTransactionControl control, final OperationStepHandler prepareStep, final int operationId) {
final AbstractOperationContext delegateContext = getDele... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"protected",
"ModelNode",
"executeReadOnlyOperation",
"(",
"final",
"ModelNode",
"operation",
",",
"final",
"OperationMessageHandler",
"handler",
",",
"final",
"OperationTransactionControl",
"control",
",",
"final",
"O... | Executes an operation on the controller latching onto an existing transaction
@param operation the operation
@param handler the handler
@param control the transaction control
@param prepareStep the prepare step to be executed before any other steps
@param operationId the id of the current transaction
@return the resul... | [
"Executes",
"an",
"operation",
"on",
"the",
"controller",
"latching",
"onto",
"an",
"existing",
"transaction"
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java#L271-L280 | train |
wildfly/wildfly-core | domain-http/interface/src/main/java/org/jboss/as/domain/http/server/ManagementHttpRequestProcessor.java | ManagementHttpRequestProcessor.addShutdownListener | public synchronized void addShutdownListener(ShutdownListener listener) {
if (state == CLOSED) {
listener.handleCompleted();
} else {
listeners.add(listener);
}
} | java | public synchronized void addShutdownListener(ShutdownListener listener) {
if (state == CLOSED) {
listener.handleCompleted();
} else {
listeners.add(listener);
}
} | [
"public",
"synchronized",
"void",
"addShutdownListener",
"(",
"ShutdownListener",
"listener",
")",
"{",
"if",
"(",
"state",
"==",
"CLOSED",
")",
"{",
"listener",
".",
"handleCompleted",
"(",
")",
";",
"}",
"else",
"{",
"listeners",
".",
"add",
"(",
"listener... | Add a shutdown listener, which gets called when all requests completed on shutdown.
@param listener the shutdown listener | [
"Add",
"a",
"shutdown",
"listener",
"which",
"gets",
"called",
"when",
"all",
"requests",
"completed",
"on",
"shutdown",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-http/interface/src/main/java/org/jboss/as/domain/http/server/ManagementHttpRequestProcessor.java#L93-L99 | train |
wildfly/wildfly-core | domain-http/interface/src/main/java/org/jboss/as/domain/http/server/ManagementHttpRequestProcessor.java | ManagementHttpRequestProcessor.handleCompleted | protected synchronized void handleCompleted() {
latch.countDown();
for (final ShutdownListener listener : listeners) {
listener.handleCompleted();
}
listeners.clear();
} | java | protected synchronized void handleCompleted() {
latch.countDown();
for (final ShutdownListener listener : listeners) {
listener.handleCompleted();
}
listeners.clear();
} | [
"protected",
"synchronized",
"void",
"handleCompleted",
"(",
")",
"{",
"latch",
".",
"countDown",
"(",
")",
";",
"for",
"(",
"final",
"ShutdownListener",
"listener",
":",
"listeners",
")",
"{",
"listener",
".",
"handleCompleted",
"(",
")",
";",
"}",
"listene... | Notify all shutdown listeners that the shutdown completed. | [
"Notify",
"all",
"shutdown",
"listeners",
"that",
"the",
"shutdown",
"completed",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-http/interface/src/main/java/org/jboss/as/domain/http/server/ManagementHttpRequestProcessor.java#L104-L110 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java | DeploymentResourceSupport.hasDeploymentSubsystemModel | public boolean hasDeploymentSubsystemModel(final String subsystemName) {
final Resource root = deploymentUnit.getAttachment(DEPLOYMENT_RESOURCE);
final PathElement subsystem = PathElement.pathElement(SUBSYSTEM, subsystemName);
return root.hasChild(subsystem);
} | java | public boolean hasDeploymentSubsystemModel(final String subsystemName) {
final Resource root = deploymentUnit.getAttachment(DEPLOYMENT_RESOURCE);
final PathElement subsystem = PathElement.pathElement(SUBSYSTEM, subsystemName);
return root.hasChild(subsystem);
} | [
"public",
"boolean",
"hasDeploymentSubsystemModel",
"(",
"final",
"String",
"subsystemName",
")",
"{",
"final",
"Resource",
"root",
"=",
"deploymentUnit",
".",
"getAttachment",
"(",
"DEPLOYMENT_RESOURCE",
")",
";",
"final",
"PathElement",
"subsystem",
"=",
"PathElemen... | Checks to see if a subsystem resource has already been registered for the deployment.
@param subsystemName the name of the subsystem
@return {@code true} if the subsystem exists on the deployment otherwise {@code false} | [
"Checks",
"to",
"see",
"if",
"a",
"subsystem",
"resource",
"has",
"already",
"been",
"registered",
"for",
"the",
"deployment",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java#L59-L63 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java | DeploymentResourceSupport.getDeploymentSubsystemModel | public ModelNode getDeploymentSubsystemModel(final String subsystemName) {
assert subsystemName != null : "The subsystemName cannot be null";
return getDeploymentSubModel(subsystemName, PathAddress.EMPTY_ADDRESS, null, deploymentUnit);
} | java | public ModelNode getDeploymentSubsystemModel(final String subsystemName) {
assert subsystemName != null : "The subsystemName cannot be null";
return getDeploymentSubModel(subsystemName, PathAddress.EMPTY_ADDRESS, null, deploymentUnit);
} | [
"public",
"ModelNode",
"getDeploymentSubsystemModel",
"(",
"final",
"String",
"subsystemName",
")",
"{",
"assert",
"subsystemName",
"!=",
"null",
":",
"\"The subsystemName cannot be null\"",
";",
"return",
"getDeploymentSubModel",
"(",
"subsystemName",
",",
"PathAddress",
... | Get the subsystem deployment model root.
<p>
If the subsystem resource does not exist one will be created.
</p>
@param subsystemName the subsystem name.
@return the model | [
"Get",
"the",
"subsystem",
"deployment",
"model",
"root",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java#L76-L79 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java | DeploymentResourceSupport.registerDeploymentSubsystemResource | public ModelNode registerDeploymentSubsystemResource(final String subsystemName, final Resource resource) {
assert subsystemName != null : "The subsystemName cannot be null";
assert resource != null : "The resource cannot be null";
return registerDeploymentSubResource(subsystemName, PathAddress.... | java | public ModelNode registerDeploymentSubsystemResource(final String subsystemName, final Resource resource) {
assert subsystemName != null : "The subsystemName cannot be null";
assert resource != null : "The resource cannot be null";
return registerDeploymentSubResource(subsystemName, PathAddress.... | [
"public",
"ModelNode",
"registerDeploymentSubsystemResource",
"(",
"final",
"String",
"subsystemName",
",",
"final",
"Resource",
"resource",
")",
"{",
"assert",
"subsystemName",
"!=",
"null",
":",
"\"The subsystemName cannot be null\"",
";",
"assert",
"resource",
"!=",
... | Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.
@param subsystemName the subsystem name
@param resource the resource to be used for the subsystem on the deployment
@return the model
@throws java.lang.IllegalStateException if the subsystem resource ... | [
"Registers",
"the",
"resource",
"to",
"the",
"parent",
"deployment",
"resource",
".",
"The",
"model",
"returned",
"is",
"that",
"of",
"the",
"resource",
"parameter",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java#L91-L95 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java | DeploymentResourceSupport.getOrCreateSubDeployment | static Resource getOrCreateSubDeployment(final String deploymentName, final DeploymentUnit parent) {
final Resource root = parent.getAttachment(DEPLOYMENT_RESOURCE);
return getOrCreate(root, PathElement.pathElement(SUBDEPLOYMENT, deploymentName));
} | java | static Resource getOrCreateSubDeployment(final String deploymentName, final DeploymentUnit parent) {
final Resource root = parent.getAttachment(DEPLOYMENT_RESOURCE);
return getOrCreate(root, PathElement.pathElement(SUBDEPLOYMENT, deploymentName));
} | [
"static",
"Resource",
"getOrCreateSubDeployment",
"(",
"final",
"String",
"deploymentName",
",",
"final",
"DeploymentUnit",
"parent",
")",
"{",
"final",
"Resource",
"root",
"=",
"parent",
".",
"getAttachment",
"(",
"DEPLOYMENT_RESOURCE",
")",
";",
"return",
"getOrCr... | Gets or creates the a resource for the sub-deployment on the parent deployments resource.
@param deploymentName the name of the deployment
@param parent the parent deployment used to find the parent resource
@return the already registered resource or a newly created resource | [
"Gets",
"or",
"creates",
"the",
"a",
"resource",
"for",
"the",
"sub",
"-",
"deployment",
"on",
"the",
"parent",
"deployments",
"resource",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java#L231-L234 | train |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java | DeploymentResourceSupport.cleanup | static void cleanup(final Resource resource) {
synchronized (resource) {
for (final Resource.ResourceEntry entry : resource.getChildren(SUBSYSTEM)) {
resource.removeChild(entry.getPathElement());
}
for (final Resource.ResourceEntry entry : resource.getChildren... | java | static void cleanup(final Resource resource) {
synchronized (resource) {
for (final Resource.ResourceEntry entry : resource.getChildren(SUBSYSTEM)) {
resource.removeChild(entry.getPathElement());
}
for (final Resource.ResourceEntry entry : resource.getChildren... | [
"static",
"void",
"cleanup",
"(",
"final",
"Resource",
"resource",
")",
"{",
"synchronized",
"(",
"resource",
")",
"{",
"for",
"(",
"final",
"Resource",
".",
"ResourceEntry",
"entry",
":",
"resource",
".",
"getChildren",
"(",
"SUBSYSTEM",
")",
")",
"{",
"r... | Cleans up the subsystem children for the deployment and each sub-deployment resource.
@param resource the subsystem resource to clean up | [
"Cleans",
"up",
"the",
"subsystem",
"children",
"for",
"the",
"deployment",
"and",
"each",
"sub",
"-",
"deployment",
"resource",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java#L241-L250 | train |
wildfly/wildfly-core | embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java | SystemPropertyContext.resolveBaseDir | Path resolveBaseDir(final String name, final String dirName) {
final String currentDir = SecurityActions.getPropertyPrivileged(name);
if (currentDir == null) {
return jbossHomeDir.resolve(dirName);
}
return Paths.get(currentDir);
} | java | Path resolveBaseDir(final String name, final String dirName) {
final String currentDir = SecurityActions.getPropertyPrivileged(name);
if (currentDir == null) {
return jbossHomeDir.resolve(dirName);
}
return Paths.get(currentDir);
} | [
"Path",
"resolveBaseDir",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"dirName",
")",
"{",
"final",
"String",
"currentDir",
"=",
"SecurityActions",
".",
"getPropertyPrivileged",
"(",
"name",
")",
";",
"if",
"(",
"currentDir",
"==",
"null",
")",
"... | Resolves the base directory. If the system property is set that value will be used. Otherwise the path is
resolved from the home directory.
@param name the system property name
@param dirName the directory name relative to the base directory
@return the resolved base directory | [
"Resolves",
"the",
"base",
"directory",
".",
"If",
"the",
"system",
"property",
"is",
"set",
"that",
"value",
"will",
"be",
"used",
".",
"Otherwise",
"the",
"path",
"is",
"resolved",
"from",
"the",
"home",
"directory",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java#L151-L157 | train |
wildfly/wildfly-core | embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java | SystemPropertyContext.resolvePath | static Path resolvePath(final Path base, final String... paths) {
return Paths.get(base.toString(), paths);
} | java | static Path resolvePath(final Path base, final String... paths) {
return Paths.get(base.toString(), paths);
} | [
"static",
"Path",
"resolvePath",
"(",
"final",
"Path",
"base",
",",
"final",
"String",
"...",
"paths",
")",
"{",
"return",
"Paths",
".",
"get",
"(",
"base",
".",
"toString",
"(",
")",
",",
"paths",
")",
";",
"}"
] | Resolves a path relative to the base path.
@param base the base path
@param paths paths relative to the base directory
@return the resolved path | [
"Resolves",
"a",
"path",
"relative",
"to",
"the",
"base",
"path",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java#L167-L169 | train |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/operations/global/GlobalOperationHandlers.java | GlobalOperationHandlers.getChildAddresses | static Map<String, Set<String>> getChildAddresses(final OperationContext context, final PathAddress addr, final ImmutableManagementResourceRegistration registry, Resource resource, final String validChildType) {
Map<String, Set<String>> result = new HashMap<>();
Predicate<String> validChildTypeFilter =... | java | static Map<String, Set<String>> getChildAddresses(final OperationContext context, final PathAddress addr, final ImmutableManagementResourceRegistration registry, Resource resource, final String validChildType) {
Map<String, Set<String>> result = new HashMap<>();
Predicate<String> validChildTypeFilter =... | [
"static",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"getChildAddresses",
"(",
"final",
"OperationContext",
"context",
",",
"final",
"PathAddress",
"addr",
",",
"final",
"ImmutableManagementResourceRegistration",
"registry",
",",
"Resource",
"resourc... | Gets the addresses of the child resources under the given resource.
@param context the operation context
@param registry registry entry representing the resource
@param resource the current resource
@param validChildType a single child type to which the results should be limited. If {@code null} the... | [
"Gets",
"the",
"addresses",
"of",
"the",
"child",
"resources",
"under",
"the",
"given",
"resource",
"."
] | cfaf0479dcbb2d320a44c5374b93b944ec39fade | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/operations/global/GlobalOperationHandlers.java#L1009-L1064 | train |
Comcast/jrugged | jrugged-core/src/main/java/org/fishwife/jrugged/interval/DiscreteInterval.java | DiscreteInterval.plus | public DiscreteInterval plus(DiscreteInterval other) {
return new DiscreteInterval(this.min + other.min, this.max + other.max);
} | java | public DiscreteInterval plus(DiscreteInterval other) {
return new DiscreteInterval(this.min + other.min, this.max + other.max);
} | [
"public",
"DiscreteInterval",
"plus",
"(",
"DiscreteInterval",
"other",
")",
"{",
"return",
"new",
"DiscreteInterval",
"(",
"this",
".",
"min",
"+",
"other",
".",
"min",
",",
"this",
".",
"max",
"+",
"other",
".",
"max",
")",
";",
"}"
] | Returns an interval representing the addition of the
given interval with this one.
@param other interval to add to this one
@return interval sum | [
"Returns",
"an",
"interval",
"representing",
"the",
"addition",
"of",
"the",
"given",
"interval",
"with",
"this",
"one",
"."
] | b6a5147c68ee733faf5616d49800abcbba67afe9 | https://github.com/Comcast/jrugged/blob/b6a5147c68ee733faf5616d49800abcbba67afe9/jrugged-core/src/main/java/org/fishwife/jrugged/interval/DiscreteInterval.java#L74-L76 | train |
Comcast/jrugged | jrugged-core/src/main/java/org/fishwife/jrugged/interval/DiscreteInterval.java | DiscreteInterval.minus | public DiscreteInterval minus(DiscreteInterval other) {
return new DiscreteInterval(this.min - other.max, this.max - other.min);
} | java | public DiscreteInterval minus(DiscreteInterval other) {
return new DiscreteInterval(this.min - other.max, this.max - other.min);
} | [
"public",
"DiscreteInterval",
"minus",
"(",
"DiscreteInterval",
"other",
")",
"{",
"return",
"new",
"DiscreteInterval",
"(",
"this",
".",
"min",
"-",
"other",
".",
"max",
",",
"this",
".",
"max",
"-",
"other",
".",
"min",
")",
";",
"}"
] | Returns an interval representing the subtraction of the
given interval from this one.
@param other interval to subtract from this one
@return result of subtraction | [
"Returns",
"an",
"interval",
"representing",
"the",
"subtraction",
"of",
"the",
"given",
"interval",
"from",
"this",
"one",
"."
] | b6a5147c68ee733faf5616d49800abcbba67afe9 | https://github.com/Comcast/jrugged/blob/b6a5147c68ee733faf5616d49800abcbba67afe9/jrugged-core/src/main/java/org/fishwife/jrugged/interval/DiscreteInterval.java#L91-L93 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.