idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
22,100 | public static ExtensibleConfigurationPersister createHostXmlConfigurationPersister ( final ConfigurationFile file , final HostControllerEnvironment environment , final ExecutorService executorService , final ExtensionRegistry hostExtensionRegistry , final LocalHostControllerInfo localHostControllerInfo ) { String defau... | host . xml |
22,101 | public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister ( final ConfigurationFile file , ExecutorService executorService , ExtensionRegistry extensionRegistry , final HostControllerEnvironment environment ) { DomainXml domainXml = new DomainXml ( Module . getBootModuleLoader ( ) , executorS... | domain . xml |
22,102 | public static ExtensibleConfigurationPersister createTransientDomainXmlConfigurationPersister ( ExecutorService executorService , ExtensionRegistry extensionRegistry ) { DomainXml domainXml = new DomainXml ( Module . getBootModuleLoader ( ) , executorService , extensionRegistry ) ; ExtensibleConfigurationPersister pers... | slave = true |
22,103 | static void apply ( final String patchId , final Collection < ContentModification > modifications , final PatchEntry patchEntry , final ContentItemFilter filter ) { for ( final ContentModification modification : modifications ) { final ContentItem item = modification . getItem ( ) ; if ( ! filter . accepts ( item ) ) {... | Apply modifications to a content task definition . |
22,104 | protected ServiceName serviceName ( final String name ) { return baseServiceName != null ? baseServiceName . append ( name ) : null ; } | The service name to be removed . Can be overridden for unusual service naming patterns |
22,105 | private boolean subModuleExists ( File dir ) { if ( isSlotDirectory ( dir ) ) { return true ; } else { File [ ] children = dir . listFiles ( File :: isDirectory ) ; for ( File child : children ) { if ( subModuleExists ( child ) ) { return true ; } } } return false ; } | depth - first search for any module - just to check that the suggestion has any chance of delivering correct result |
22,106 | private String tail ( String moduleName ) { if ( moduleName . indexOf ( MODULE_NAME_SEPARATOR ) > 0 ) { return moduleName . substring ( moduleName . indexOf ( MODULE_NAME_SEPARATOR ) + 1 ) ; } else { return "" ; } } | get all parts of module name apart from first |
22,107 | void resolveBootUpdates ( final ModelController controller , final ActiveOperation . CompletedCallback < ModelNode > callback ) throws Exception { connection . openConnection ( controller , callback ) ; this . controller = controller ; } | Resolve the boot updates and register at the local HC . |
22,108 | static VaultConfig loadExternalFile ( File f ) throws XMLStreamException { if ( f == null ) { throw new IllegalArgumentException ( "File is null" ) ; } if ( ! f . exists ( ) ) { throw new XMLStreamException ( "Failed to locate vault file " + f . getAbsolutePath ( ) ) ; } final VaultConfig config = new VaultConfig ( ) ;... | In the 2 . 0 xsd the vault is in an external file which has no namespace using the output of the vault tool . |
22,109 | static VaultConfig readVaultElement_3_0 ( XMLExtendedStreamReader reader , Namespace expectedNs ) throws XMLStreamException { final VaultConfig config = new VaultConfig ( ) ; final int count = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { final String value = reader . getAttributeValue ( i ) ;... | In the 3 . 0 xsd the vault configuration and its options are part of the vault xsd . |
22,110 | private Set < String > checkModel ( final ModelNode model , TransformationContext context ) throws OperationFailedException { final Set < String > attributes = new HashSet < String > ( ) ; AttributeTransformationRequirementChecker checker ; for ( final String attribute : attributeNames ) { if ( model . hasDefined ( att... | Check the model for expression values . |
22,111 | public void setValue ( String propName , Object value ) { for ( RequestProp prop : props ) { if ( prop . getName ( ) . equals ( propName ) ) { JComponent valComp = prop . getValueComponent ( ) ; if ( valComp instanceof JTextComponent ) { ( ( JTextComponent ) valComp ) . setText ( value . toString ( ) ) ; } if ( valComp... | Set the value of the underlying component . Note that this will not work for ListEditor components . Also note that for a JComboBox The value object must have the same identity as an object in the drop - down . |
22,112 | static void doDifference ( Map < String , String > left , Map < String , String > right , Map < String , String > onlyOnLeft , Map < String , String > onlyOnRight , Map < String , String > updated ) { onlyOnRight . clear ( ) ; onlyOnRight . putAll ( right ) ; for ( Map . Entry < String , String > entry : left . entrySe... | calculate the difference of the two maps so we know what was added removed & updated |
22,113 | public void close ( ) throws IOException { final ManagedBinding binding = this . socketBindingManager . getNamedRegistry ( ) . getManagedBinding ( this . name ) ; if ( binding == null ) { return ; } binding . close ( ) ; } | Closes the outbound socket binding connection . |
22,114 | public static boolean requiresReload ( final Set < Flag > flags ) { return flags . contains ( Flag . RESTART_ALL_SERVICES ) || flags . contains ( Flag . RESTART_RESOURCE_SERVICES ) ; } | Checks to see within the flags if a reload i . e . not a full restart is required . |
22,115 | protected void updateState ( final String name , final InstallationModificationImpl modification , final InstallationModificationImpl . InstallationState state ) { final PatchableTarget . TargetInfo identityInfo = modification . getModifiedState ( ) ; this . identity = new Identity ( ) { public String getVersion ( ) { ... | Update the installed identity using the modified state from the modification . |
22,116 | public static Set < String > listAllLinks ( OperationContext context , String overlay ) { Set < String > serverGoupNames = listServerGroupsReferencingOverlay ( context . readResourceFromRoot ( PathAddress . EMPTY_ADDRESS ) , overlay ) ; Set < String > links = new HashSet < > ( ) ; for ( String serverGoupName : serverGo... | Returns all the deployment runtime names associated with an overlay accross all server groups . |
22,117 | public static Set < String > listLinks ( OperationContext context , PathAddress overlayAddress ) { Resource overlayResource = context . readResourceFromRoot ( overlayAddress ) ; if ( overlayResource . hasChildren ( DEPLOYMENT ) ) { return overlayResource . getChildrenNames ( DEPLOYMENT ) ; } return Collections . emptyS... | Returns all the deployment runtime names associated with an overlay . |
22,118 | public static void redeployDeployments ( OperationContext context , PathAddress deploymentsRootAddress , Set < String > deploymentNames ) throws OperationFailedException { for ( String deploymentName : deploymentNames ) { PathAddress address = deploymentsRootAddress . append ( DEPLOYMENT , deploymentName ) ; OperationS... | We are adding a redeploy operation step for each specified deployment runtime name . |
22,119 | public static void redeployLinksAndTransformOperation ( OperationContext context , ModelNode removeOperation , PathAddress deploymentsRootAddress , Set < String > runtimeNames ) throws OperationFailedException { Set < String > deploymentNames = listDeployments ( context . readResourceFromRoot ( deploymentsRootAddress )... | It will look for all the deployments under the deploymentsRootAddress with a runtimeName in the specified list of runtime names and then transform the operation so that every server having those deployments will redeploy the affected deployments . |
22,120 | public static Set < String > listDeployments ( Resource deploymentRootResource , Set < String > runtimeNames ) { Set < Pattern > set = new HashSet < > ( ) ; for ( String wildcardExpr : runtimeNames ) { Pattern pattern = DeploymentOverlayIndex . getPattern ( wildcardExpr ) ; set . add ( pattern ) ; } return listDeployme... | Returns the deployment names with the specified runtime names at the specified deploymentRootAddress . |
22,121 | public void execute ( CommandHandler handler , int timeout , TimeUnit unit ) throws CommandLineException , InterruptedException , ExecutionException , TimeoutException { ExecutableBuilder builder = new ExecutableBuilder ( ) { CommandContext c = newTimeoutCommandContext ( ctx ) ; public Executable build ( ) { return ( )... | public for testing purpose |
22,122 | void execute ( ExecutableBuilder builder , int timeout , TimeUnit unit ) throws CommandLineException , InterruptedException , ExecutionException , TimeoutException { Future < Void > task = executorService . submit ( ( ) -> { builder . build ( ) . execute ( ) ; return null ; } ) ; try { if ( timeout <= 0 ) { task . get ... | The CommandContext can be retrieved thatnks to the ExecutableBuilder . |
22,123 | public String getOriginalValue ( ParsedCommandLine parsedLine , boolean required ) throws CommandFormatException { String value = null ; if ( parsedLine . hasProperties ( ) ) { if ( index >= 0 ) { List < String > others = parsedLine . getOtherProperties ( ) ; if ( others . size ( ) > index ) { return others . get ( ind... | Returns value as it appeared on the command line with escape sequences and system properties not resolved . The variables though are resolved during the initial parsing of the command line . |
22,124 | public static void logBeforeExit ( ExitLogger logger ) { try { if ( logged . compareAndSet ( false , true ) ) { logger . logExit ( ) ; } } catch ( Throwable ignored ) { } } | Invokes the exit logger if and only if no ExitLogger was previously invoked . |
22,125 | private String getName ( CommandContext ctx , boolean failInBatch ) throws CommandLineException { final ParsedCommandLine args = ctx . getParsedCommandLine ( ) ; final String name = this . name . getValue ( args , true ) ; if ( name == null ) { throw new CommandFormatException ( this . name + " is missing value." ) ; }... | Validate that the overlay exists . If it doesn t exist throws an exception if not in batch mode or if failInBatch is true . In batch mode we could be in the case that the overlay doesn t exist yet . |
22,126 | public static ServiceName moduleSpecServiceName ( ModuleIdentifier identifier ) { if ( ! isDynamicModule ( identifier ) ) { throw ServerLogger . ROOT_LOGGER . missingModulePrefix ( identifier , MODULE_PREFIX ) ; } return MODULE_SPEC_SERVICE_PREFIX . append ( identifier . getName ( ) ) . append ( identifier . getSlot ( ... | Returns the corresponding ModuleSpec service name for the given module . |
22,127 | public static ServiceName moduleResolvedServiceName ( ModuleIdentifier identifier ) { if ( ! isDynamicModule ( identifier ) ) { throw ServerLogger . ROOT_LOGGER . missingModulePrefix ( identifier , MODULE_PREFIX ) ; } return MODULE_RESOLVED_SERVICE_PREFIX . append ( identifier . getName ( ) ) . append ( identifier . ge... | Returns the corresponding module resolved service name for the given module . |
22,128 | public static ServiceName moduleServiceName ( ModuleIdentifier identifier ) { if ( ! identifier . getName ( ) . startsWith ( MODULE_PREFIX ) ) { throw ServerLogger . ROOT_LOGGER . missingModulePrefix ( identifier , MODULE_PREFIX ) ; } return MODULE_SERVICE_PREFIX . append ( identifier . getName ( ) ) . append ( identif... | Returns the corresponding ModuleLoadService service name for the given module . |
22,129 | public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ServicesAttachment servicesAttachment = deploymentUnit . getAttachment ( Attachments . SERVICES ) ; if ( servicesAttachment == null || ... | If the deployment has a module attached it will ask the module to load the ServiceActivator services . |
22,130 | synchronized void openConnection ( final ModelController controller , final ActiveOperation . CompletedCallback < ModelNode > callback ) throws Exception { boolean ok = false ; final Connection connection = connectionManager . connect ( ) ; try { channelHandler . executeRequest ( new ServerRegisterRequest ( ) , null , ... | Connect to the HC and retrieve the current model updates . |
22,131 | synchronized void asyncReconnect ( final URI reconnectUri , String authKey , final ReconnectCallback callback ) { if ( getState ( ) != State . OPEN ) { return ; } final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration . copy ( configuration ) ; config . setCallbackHandler ( createClientCallbackH... | This continuously tries to reconnect in a separate thread and will only stop if the connection was established successfully or the server gets shutdown . If there is currently a reconnect task active the connection paramaters and callback will get updated . |
22,132 | synchronized boolean doReConnect ( ) throws IOException { if ( connectionManager . isConnected ( ) ) { try { final Future < Long > result = channelHandler . executeRequest ( ManagementPingRequest . INSTANCE , null ) . getResult ( ) ; result . get ( 15 , TimeUnit . SECONDS ) ; return true ; } catch ( Exception e ) { Ser... | Reconnect to the HC . |
22,133 | synchronized void started ( ) { try { if ( isConnected ( ) ) { channelHandler . executeRequest ( new ServerStartedRequest ( ) , null ) . getResult ( ) . await ( ) ; } } catch ( Exception e ) { ServerLogger . AS_ROOT_LOGGER . debugf ( e , "failed to send started notification" ) ; } } | Send the started notification |
22,134 | public int executeTask ( final TransactionalProtocolClient . TransactionalOperationListener < ServerOperation > listener , final ServerUpdateTask task ) { try { return execute ( listener , task . getServerIdentity ( ) , task . getOperation ( ) ) ; } catch ( OperationFailedException e ) { final ServerIdentity identity =... | Execute a server task . |
22,135 | protected boolean executeOperation ( final TransactionalProtocolClient . TransactionalOperationListener < ServerOperation > listener , TransactionalProtocolClient client , final ServerIdentity identity , final ModelNode operation , final OperationResultTransformer transformer ) { if ( client == null ) { return false ; ... | Execute the operation . |
22,136 | void recordPreparedOperation ( final TransactionalProtocolClient . PreparedOperation < ServerTaskExecutor . ServerOperation > preparedOperation ) { recordPreparedTask ( new ServerTaskExecutor . ServerPreparedResponse ( preparedOperation ) ) ; } | Record a prepare operation . |
22,137 | void recordOperationPrepareTimeout ( final BlockingQueueOperationListener . FailedOperation < ServerOperation > failedOperation ) { recordPreparedTask ( new ServerTaskExecutor . ServerPreparedResponse ( failedOperation ) ) ; ServerIdentity identity = failedOperation . getOperation ( ) . getIdentity ( ) ; AsyncFuture < ... | Record a prepare operation timeout . |
22,138 | public static ServiceController < InstallationManager > installService ( ServiceTarget serviceTarget ) { final InstallationManagerService service = new InstallationManagerService ( ) ; return serviceTarget . addService ( InstallationManagerService . NAME , service ) . addDependency ( JBOSS_PRODUCT_CONFIG_SERVICE , Prod... | Install the installation manager service . |
22,139 | public Method getMethod ( Method method ) { return getMethod ( method . getReturnType ( ) , method . getName ( ) , method . getParameterTypes ( ) ) ; } | Get the canonical method declared on this object . |
22,140 | public Collection < Method > getAllMethods ( String name ) { final Map < ParamList , Map < Class < ? > , Method > > nameMap = methods . get ( name ) ; if ( nameMap == null ) { return Collections . emptySet ( ) ; } final Collection < Method > methods = new ArrayList < Method > ( ) ; for ( Map < Class < ? > , Method > ma... | Get a collection of methods declared on this object by method name . |
22,141 | public Collection < Method > getAllMethods ( String name , int paramCount ) { final Map < ParamList , Map < Class < ? > , Method > > nameMap = methods . get ( name ) ; if ( nameMap == null ) { return Collections . emptySet ( ) ; } final Collection < Method > methods = new ArrayList < Method > ( ) ; for ( Map < Class < ... | Get a collection of methods declared on this object by method name and parameter count . |
22,142 | public static ServiceActivator create ( final ModelNode endpointConfig , final URI managementURI , final String serverName , final String serverProcessName , final String authKey , final boolean managementSubsystemEndpoint , final Supplier < SSLContext > sslContextSupplier ) { return new DomainServerCommunicationServic... | Create a new service activator for the domain server communication services . |
22,143 | public InetSocketAddress getMulticastSocketAddress ( ) { if ( multicastAddress == null ) { throw MESSAGES . noMulticastBinding ( name ) ; } return new InetSocketAddress ( multicastAddress , multicastPort ) ; } | Get the multicast socket address . |
22,144 | public ServerSocket createServerSocket ( ) throws IOException { final ServerSocket socket = getServerSocketFactory ( ) . createServerSocket ( name ) ; socket . bind ( getSocketAddress ( ) ) ; return socket ; } | Create and bind a server socket |
22,145 | public static void registerDeploymentResource ( final DeploymentResourceSupport deploymentResourceSupport , final LoggingConfigurationService service ) { final PathElement base = PathElement . pathElement ( "configuration" , service . getConfiguration ( ) ) ; deploymentResourceSupport . getDeploymentSubModel ( LoggingE... | Registers the deployment resources needed . |
22,146 | public static String constructUrl ( final HttpServerExchange exchange , final String path ) { final HeaderMap headers = exchange . getRequestHeaders ( ) ; String host = headers . getFirst ( HOST ) ; String protocol = exchange . getConnection ( ) . getSslSessionInfo ( ) != null ? "https" : "http" ; return protocol + ":/... | Based on the current request represented by the HttpExchange construct a complete URL for the supplied path . |
22,147 | public boolean matches ( Property property ) { return property . getName ( ) . equals ( key ) && ( value == WILDCARD_VALUE || property . getValue ( ) . asString ( ) . equals ( value ) ) ; } | Determine whether the given property matches this element . A property matches this element when property name and this key are equal values are equal or this element value is a wildcard . |
22,148 | public boolean matches ( PathElement pe ) { return pe . key . equals ( key ) && ( isWildcard ( ) || pe . value . equals ( value ) ) ; } | Determine whether the given element matches this element . An element matches this element when keys are equal values are equal or this element value is a wildcard . |
22,149 | public void setAppender ( final Appender appender ) { if ( this . appender != null ) { close ( ) ; } checkAccess ( this ) ; if ( applyLayout && appender != null ) { final Formatter formatter = getFormatter ( ) ; appender . setLayout ( formatter == null ? null : new FormatterLayout ( formatter ) ) ; } appenderUpdater . ... | Set the Log4j appender . |
22,150 | private ModelNode createOSNode ( ) throws OperationFailedException { String osName = getProperty ( "os.name" ) ; final ModelNode os = new ModelNode ( ) ; if ( osName != null && osName . toLowerCase ( ) . contains ( "linux" ) ) { try { os . set ( GnuLinuxDistribution . discover ( ) ) ; } catch ( IOException ex ) { throw... | Create a ModelNode representing the operating system the instance is running on . |
22,151 | private ModelNode createJVMNode ( ) throws OperationFailedException { ModelNode jvm = new ModelNode ( ) . setEmptyObject ( ) ; jvm . get ( NAME ) . set ( getProperty ( "java.vm.name" ) ) ; jvm . get ( JAVA_VERSION ) . set ( getProperty ( "java.vm.specification.version" ) ) ; jvm . get ( JVM_VERSION ) . set ( getPropert... | Create a ModelNode representing the JVM the instance is running on . |
22,152 | private ModelNode createCPUNode ( ) throws OperationFailedException { ModelNode cpu = new ModelNode ( ) . setEmptyObject ( ) ; cpu . get ( ARCH ) . set ( getProperty ( "os.arch" ) ) ; cpu . get ( AVAILABLE_PROCESSORS ) . set ( ProcessorInfo . availableProcessors ( ) ) ; return cpu ; } | Create a ModelNode representing the CPU the instance is running on . |
22,153 | private String getProperty ( String name ) { return System . getSecurityManager ( ) == null ? System . getProperty ( name ) : doPrivileged ( new ReadPropertyAction ( name ) ) ; } | Get a System property by its name . |
22,154 | public void explore ( ) { if ( isLeaf ) return ; if ( isGeneric ) return ; removeAllChildren ( ) ; try { String addressPath = addressPath ( ) ; ModelNode resourceDesc = executor . doCommand ( addressPath + ":read-resource-description" ) ; resourceDesc = resourceDesc . get ( "result" ) ; ModelNode response = executor . ... | Refresh children using read - resource operation . |
22,155 | public String addressPath ( ) { if ( isLeaf ) { ManagementModelNode parent = ( ManagementModelNode ) getParent ( ) ; return parent . addressPath ( ) ; } StringBuilder builder = new StringBuilder ( ) ; for ( Object pathElement : getUserObjectPath ( ) ) { UserObject userObj = ( UserObject ) pathElement ; if ( userObj . i... | Get the DMR path for this node . For leaves the DMR path is the path of its parent . |
22,156 | private static boolean mayBeIPv6Address ( String input ) { if ( input == null ) { return false ; } boolean result = false ; int colonsCounter = 0 ; int length = input . length ( ) ; for ( int i = 0 ; i < length ; i ++ ) { char c = input . charAt ( i ) ; if ( c == '.' || c == '%' ) { break ; } if ( ! ( ( c >= '0' && c <... | Heuristic check if string might be an IPv6 address . |
22,157 | public static void initializeDomainRegistry ( final TransformerRegistry registry ) { registerRootTransformers ( registry ) ; registerChainedManagementTransformers ( registry ) ; registerChainedServerGroupTransformers ( registry ) ; registerProfileTransformers ( registry ) ; registerSocketBindingGroupTransformers ( regi... | Initialize the domain registry . |
22,158 | static boolean killProcess ( final String processName , int id ) { int pid ; try { pid = processUtils . resolveProcessId ( processName , id ) ; if ( pid > 0 ) { try { Runtime . getRuntime ( ) . exec ( processUtils . getKillCommand ( pid ) ) ; return true ; } catch ( Throwable t ) { ProcessLogger . ROOT_LOGGER . debugf ... | Try to kill a given process . |
22,159 | public Launcher addEnvironmentVariable ( final String key , final String value ) { env . put ( key , value ) ; return this ; } | Adds an environment variable to the process being created . |
22,160 | private void buildTransformers_3_0 ( ResourceTransformationDescriptionBuilder builder ) { builder . addChildResource ( ConnectorResource . PATH ) . getAttributeBuilder ( ) . setDiscard ( DiscardAttributeChecker . UNDEFINED , ConnectorCommon . SASL_AUTHENTICATION_FACTORY , ConnectorResource . SSL_CONTEXT ) . addRejectCh... | EAP 7 . 0 |
22,161 | private void buildTransformers_4_0 ( ResourceTransformationDescriptionBuilder builder ) { EndPointWriteTransformer endPointWriteTransformer = new EndPointWriteTransformer ( ) ; builder . getAttributeBuilder ( ) . setDiscard ( DiscardAttributeChecker . ALWAYS , endpointAttrArray ) . end ( ) . addOperationTransformationO... | EAP 7 . 1 |
22,162 | ServerStatus getState ( ) { final InternalState requiredState = this . requiredState ; final InternalState state = internalState ; if ( requiredState == InternalState . FAILED ) { return ServerStatus . FAILED ; } switch ( state ) { case STOPPED : return ServerStatus . STOPPED ; case SERVER_STARTED : return ServerStatus... | Determine the current state the server is in . |
22,163 | synchronized boolean reload ( int permit , boolean suspend ) { return internalSetState ( new ReloadTask ( permit , suspend ) , InternalState . SERVER_STARTED , InternalState . RELOADING ) ; } | Reload a managed server . |
22,164 | synchronized void start ( final ManagedServerBootCmdFactory factory ) { final InternalState required = this . requiredState ; if ( required == InternalState . SERVER_STARTED ) { return ; } if ( required != InternalState . FAILED ) { final InternalState current = this . internalState ; if ( current != required ) { throw... | Start a managed server . |
22,165 | synchronized void stop ( Integer timeout ) { final InternalState required = this . requiredState ; if ( required != InternalState . STOPPED ) { this . requiredState = InternalState . STOPPED ; ROOT_LOGGER . stoppingServer ( serverName ) ; if ( internalState == InternalState . SERVER_STARTED ) { internalSetState ( new S... | Stop a managed server . |
22,166 | synchronized void reconnectServerProcess ( final ManagedServerBootCmdFactory factory ) { if ( this . requiredState != InternalState . SERVER_STARTED ) { this . bootConfiguration = factory ; this . requiredState = InternalState . SERVER_STARTED ; ROOT_LOGGER . reconnectingServer ( serverName ) ; internalSetState ( new R... | Try to reconnect to a started server . |
22,167 | synchronized void removeServerProcess ( ) { this . requiredState = InternalState . STOPPED ; internalSetState ( new ProcessRemoveTask ( ) , InternalState . STOPPED , InternalState . PROCESS_REMOVING ) ; } | On host controller reload remove a not running server registered in the process controller declared as down . |
22,168 | synchronized void setServerProcessStopping ( ) { this . requiredState = InternalState . STOPPED ; internalSetState ( null , InternalState . STOPPED , InternalState . PROCESS_STOPPING ) ; } | On host controller reload remove a not running server registered in the process controller declared as stopping . |
22,169 | boolean awaitState ( final InternalState expected ) { synchronized ( this ) { final InternalState initialRequired = this . requiredState ; for ( ; ; ) { final InternalState required = this . requiredState ; if ( required == InternalState . FAILED ) { return false ; } else if ( initialRequired != required ) { return fal... | Await a state . |
22,170 | boolean processUnstable ( ) { boolean change = ! unstable ; if ( change ) { unstable = true ; HostControllerLogger . ROOT_LOGGER . managedServerUnstable ( serverName ) ; } return change ; } | Notification that the process has become unstable . |
22,171 | boolean callbackUnregistered ( final TransactionalProtocolClient old , final boolean shuttingDown ) { protocolClient . disconnected ( old ) ; synchronized ( this ) { if ( ! shuttingDown && requiredState == InternalState . SERVER_STARTED ) { final InternalState state = internalState ; if ( state == InternalState . PROCE... | Unregister the mgmt channel . |
22,172 | synchronized void processFinished ( ) { final InternalState required = this . requiredState ; final InternalState state = this . internalState ; if ( required == InternalState . STOPPED && state == InternalState . PROCESS_STOPPING ) { finishTransition ( InternalState . PROCESS_STOPPING , InternalState . PROCESS_STOPPED... | Notification that the server process finished . |
22,173 | synchronized void transitionFailed ( final InternalState state ) { final InternalState current = this . internalState ; if ( state == current ) { switch ( current ) { case PROCESS_ADDING : this . internalState = InternalState . PROCESS_STOPPED ; break ; case PROCESS_STARTED : internalSetState ( getTransitionTask ( Inte... | Notification that a state transition failed . |
22,174 | private synchronized void finishTransition ( final InternalState current , final InternalState next ) { internalSetState ( getTransitionTask ( next ) , current , next ) ; transition ( ) ; } | Finish a state transition from a notification . |
22,175 | public void registerCapabilities ( ManagementResourceRegistration resourceRegistration ) { if ( capabilities != null ) { for ( RuntimeCapability c : capabilities ) { resourceRegistration . registerCapability ( c ) ; } } if ( incorporatingCapabilities != null ) { resourceRegistration . registerIncorporatingCapabilities ... | Register capabilities associated with this resource . |
22,176 | @ SuppressWarnings ( "deprecation" ) protected void registerAddOperation ( final ManagementResourceRegistration registration , final OperationStepHandler handler , OperationEntry . Flag ... flags ) { if ( handler instanceof DescriptionProvider ) { registration . registerOperationHandler ( getOperationDefinition ( Model... | Registers add operation |
22,177 | private static void handlePing ( final Channel channel , final ManagementProtocolHeader header ) throws IOException { final ManagementProtocolHeader response = new ManagementPongHeader ( header . getVersion ( ) ) ; final MessageOutputStream output = channel . writeMessage ( ) ; try { writeHeader ( response , output ) ;... | Handle a simple ping request . |
22,178 | public static String resolveOrOriginal ( String input ) { try { return resolve ( input , true ) ; } catch ( UnresolvedExpressionException e ) { return input ; } } | Attempts to substitute all the found expressions in the input with their corresponding resolved values . If any of the found expressions failed to resolve or if the input does not contain any expression the input is returned as is . |
22,179 | private OperationResponse executeForResult ( final OperationExecutionContext executionContext ) throws IOException { try { return execute ( executionContext ) . get ( ) ; } catch ( Exception e ) { throw new IOException ( e ) ; } } | Execute for result . |
22,180 | public static LayersConfig getLayersConfig ( final File repoRoot ) throws IOException { final File layersList = new File ( repoRoot , LAYERS_CONF ) ; if ( ! layersList . exists ( ) ) { return new LayersConfig ( ) ; } final Properties properties = PatchUtils . loadProperties ( layersList ) ; return new LayersConfig ( pr... | Process the layers . conf file . |
22,181 | private boolean parseRemoteDomainControllerAttributes_1_5 ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list , boolean allowDiscoveryOptions ) throws XMLStreamException { final ModelNode update = new ModelNode ( ) ; update . get ( OP_ADDR ) . set ( address ) ; update . get ... | The only difference between version 1 . 5 and 1 . 6 of the schema were to make is possible to define discovery options this resulted in the host and port attributes becoming optional - this method also indicates if discovery options are required where the host and port were not supplied . |
22,182 | public static RemoteProxyController create ( final TransactionalProtocolClient client , final PathAddress pathAddress , final ProxyOperationAddressTranslator addressTranslator , final ModelVersion targetKernelVersion ) { return new RemoteProxyController ( client , pathAddress , addressTranslator , targetKernelVersion )... | Create a new remote proxy controller . |
22,183 | public static RemoteProxyController create ( final ManagementChannelHandler channelAssociation , final PathAddress pathAddress , final ProxyOperationAddressTranslator addressTranslator ) { final TransactionalProtocolClient client = TransactionalProtocolHandlers . createClient ( channelAssociation ) ; return create ( cl... | Creates a new remote proxy controller using an existing channel . |
22,184 | public ModelNode translateOperationForProxy ( final ModelNode op ) { return translateOperationForProxy ( op , PathAddress . pathAddress ( op . get ( OP_ADDR ) ) ) ; } | Translate the operation address . |
22,185 | private void flush ( final boolean propagate ) throws IOException { final int avail = baseNCodec . available ( context ) ; if ( avail > 0 ) { final byte [ ] buf = new byte [ avail ] ; final int c = baseNCodec . readResults ( buf , 0 , avail , context ) ; if ( c > 0 ) { out . write ( buf , 0 , c ) ; } } if ( propagate )... | Flushes this output stream and forces any buffered output bytes to be written out to the stream . If propagate is true the wrapped stream will also be flushed . |
22,186 | public void close ( ) throws IOException { if ( doEncode ) { baseNCodec . encode ( singleByte , 0 , EOF , context ) ; } else { baseNCodec . decode ( singleByte , 0 , EOF , context ) ; } flush ( ) ; out . close ( ) ; } | Closes this output stream and releases any system resources associated with the stream . |
22,187 | private ModelNode resolveExpressionsRecursively ( final ModelNode node ) throws OperationFailedException { if ( ! node . isDefined ( ) ) { return node ; } ModelType type = node . getType ( ) ; ModelNode resolved ; if ( type == ModelType . EXPRESSION ) { resolved = resolveExpressionStringRecursively ( node . asExpressio... | Examine the given model node resolving any expressions found within including within child nodes . |
22,188 | private ModelNode resolveExpressionStringRecursively ( final String expressionString , final boolean ignoreDMRResolutionFailure , final boolean initial ) throws OperationFailedException { ParseAndResolveResult resolved = parseAndResolve ( expressionString , ignoreDMRResolutionFailure ) ; if ( resolved . recursive ) { r... | Attempt to resolve the given expression string recursing if resolution of one string produces another expression . |
22,189 | private String resolveExpressionString ( final String unresolvedString ) throws OperationFailedException { assert unresolvedString . startsWith ( "${" ) && unresolvedString . endsWith ( "}" ) ; String result = unresolvedString ; ModelNode resolveNode = new ModelNode ( new ValueExpression ( unresolvedString ) ) ; resolv... | Resolve the given string using any plugin and the DMR resolve method |
22,190 | private static XMLStreamException unexpectedElement ( final XMLStreamReader reader ) { return SecurityManagerLogger . ROOT_LOGGER . unexpectedElement ( reader . getName ( ) , reader . getLocation ( ) ) ; } | Gets an exception reporting an unexpected XML element . |
22,191 | private static XMLStreamException unexpectedAttribute ( final XMLStreamReader reader , final int index ) { return SecurityManagerLogger . ROOT_LOGGER . unexpectedAttribute ( reader . getAttributeName ( index ) , reader . getLocation ( ) ) ; } | Gets an exception reporting an unexpected XML attribute . |
22,192 | public static byte [ ] storeContentAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws IOException , OperationFailedException { if ( ! operation . hasDefined ( CONTENT ) ) { throw createFailureException ( DomainControllerLogger . ROOT_LOGGER . invalidCon... | Store the deployment contents and attach a transformed slave operation to the operation context . |
22,193 | public static byte [ ] explodeContentAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws OperationFailedException , ExplodedContentException { final Resource deploymentResource = context . readResource ( PathAddress . EMPTY_ADDRESS ) ; ModelNode contentI... | Explode the deployment contents and attach a transformed slave operation to the operation context . |
22,194 | public static byte [ ] addContentToExplodedAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws OperationFailedException , ExplodedContentException { final Resource deploymentResource = context . readResource ( PathAddress . EMPTY_ADDRESS ) ; ModelNode co... | Add contents to the deployment and attach a transformed slave operation to the operation context . |
22,195 | public static byte [ ] removeContentFromExplodedAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws OperationFailedException , ExplodedContentException { final Resource deploymentResource = context . readResource ( PathAddress . EMPTY_ADDRESS ) ; ModelNo... | Remove contents from the deployment and attach a transformed slave operation to the operation context . |
22,196 | public static byte [ ] synchronizeSlaveHostController ( ModelNode operation , final PathAddress address , HostFileRepository fileRepository , ContentRepository contentRepository , boolean backup , byte [ ] oldHash ) { ModelNode operationContentItem = operation . get ( DeploymentAttributes . CONTENT_RESOURCE_ALL . getNa... | Synchronize the required files to a slave HC from the master DC if this is required . |
22,197 | public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; for ( ResourceRoot resourceRoot : DeploymentUtils . allResourceRoots ( deploymentUnit ) ) { ResourceRootIndexer . indexResourceRoot ( resourc... | Process this deployment for annotations . This will use an annotation indexer to create an index of all annotations found in this deployment and attach it to the deployment unit context . |
22,198 | public static File newFile ( File baseDir , String ... segments ) { File f = baseDir ; for ( String segment : segments ) { f = new File ( f , segment ) ; } return f ; } | Return a new File object based on the baseDir and the segments . |
22,199 | public PasswordCheckResult check ( boolean isAdminitrative , String userName , String password ) { List < PasswordRestriction > passwordValuesRestrictions = getPasswordRestrictions ( ) ; final PasswordStrengthCheckResult strengthResult = this . passwordStrengthChecker . check ( userName , password , passwordValuesRestr... | Method which performs strength checks on password . It returns outcome which can be used by CLI . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.