idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
22,300 | public static XMLStreamException missingRequiredElement ( final XMLExtendedStreamReader reader , final Set < ? > required ) { final StringBuilder b = new StringBuilder ( ) ; Iterator < ? > iterator = required . iterator ( ) ; while ( iterator . hasNext ( ) ) { final Object o = iterator . next ( ) ; b . append ( o . toS... | Get an exception reporting a missing required XML child element . |
22,301 | public static void requireNamespace ( final XMLExtendedStreamReader reader , final Namespace requiredNs ) throws XMLStreamException { Namespace actualNs = Namespace . forUri ( reader . getNamespaceURI ( ) ) ; if ( actualNs != requiredNs ) { throw unexpectedElement ( reader ) ; } } | Require that the namespace of the current element matches the required namespace . |
22,302 | public static boolean readBooleanAttributeElement ( final XMLExtendedStreamReader reader , final String attributeName ) throws XMLStreamException { requireSingleAttribute ( reader , attributeName ) ; final boolean value = Boolean . parseBoolean ( reader . getAttributeValue ( 0 ) ) ; requireNoContent ( reader ) ; return... | Read an element which contains only a single boolean attribute . |
22,303 | @ SuppressWarnings ( { "unchecked" , "WeakerAccess" } ) public static < T > List < T > readListAttributeElement ( final XMLExtendedStreamReader reader , final String attributeName , final Class < T > type ) throws XMLStreamException { requireSingleAttribute ( reader , attributeName ) ; final List < T > value = ( List <... | Read an element which contains only a single list attribute of a given type . |
22,304 | @ SuppressWarnings ( { "unchecked" } ) public static < T > T [ ] readArrayAttributeElement ( final XMLExtendedStreamReader reader , final String attributeName , final Class < T > type ) throws XMLStreamException { final List < T > list = readListAttributeElement ( reader , attributeName , type ) ; return list . toArray... | Read an element which contains only a single list attribute of a given type returning it as an array . |
22,305 | public ModelNode resolveValue ( ExpressionResolver resolver , ModelNode value ) throws OperationFailedException { ModelNode superResult = value . getType ( ) == ModelType . OBJECT ? value : super . resolveValue ( resolver , value ) ; if ( superResult . getType ( ) != ModelType . OBJECT ) { return superResult ; } ModelN... | Overrides the superclass implementation to allow the AttributeDefinition for each field in the object to in turn resolve that field . |
22,306 | public static void handleDomainOperationResponseStreams ( final OperationContext context , final ModelNode responseNode , final List < OperationResponse . StreamEntry > streams ) { if ( responseNode . hasDefined ( RESPONSE_HEADERS ) ) { ModelNode responseHeaders = responseNode . get ( RESPONSE_HEADERS ) ; responseHeade... | Deal with streams attached to an operation response from a proxied domain process . |
22,307 | public final synchronized void shutdown ( ) { stopped = true ; if ( cleanupTaskFuture != null ) { cleanupTaskFuture . cancel ( false ) ; } for ( Map . Entry < InputStreamKey , TimedStreamEntry > entry : streamMap . entrySet ( ) ) { InputStreamKey key = entry . getKey ( ) ; TimedStreamEntry timedStreamEntry = entry . ge... | Closes any registered stream entries that have not yet been consumed |
22,308 | void gc ( ) { if ( stopped ) { return ; } long expirationTime = System . currentTimeMillis ( ) - timeout ; for ( Iterator < Map . Entry < InputStreamKey , TimedStreamEntry > > iter = streamMap . entrySet ( ) . iterator ( ) ; iter . hasNext ( ) ; ) { if ( stopped ) { return ; } Map . Entry < InputStreamKey , TimedStream... | Close and remove expired streams . Package protected to allow unit tests to invoke it . |
22,309 | private List < PermissionFactory > retrievePermissionSet ( final OperationContext context , final ModelNode node ) throws OperationFailedException { final List < PermissionFactory > permissions = new ArrayList < > ( ) ; if ( node != null && node . isDefined ( ) ) { for ( ModelNode permissionNode : node . asList ( ) ) {... | This method retrieves all security permissions contained within the specified node . |
22,310 | 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 , final boolean autoDeployExploded , final boolean autoDeployXml , fi... | Add the deployment scanner service to a batch . |
22,311 | 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... | Find a node in the tree . The node must be visible to be found . |
22,312 | public ManagementModelNode getSelectedNode ( ) { if ( tree . getSelectionPath ( ) == null ) return null ; return ( ManagementModelNode ) tree . getSelectionPath ( ) . getLastPathComponent ( ) ; } | Get the node that has been selected by the user or null if nothing is selected . |
22,313 | public static Connection connectSync ( final ProtocolConnectionConfiguration configuration ) throws IOException { long timeoutMillis = configuration . getConnectionTimeout ( ) ; CallbackHandler handler = configuration . getCallbackHandler ( ) ; final CallbackHandler actualHandler ; ProtocolTimeoutHandler timeoutHandler... | Connect sync . |
22,314 | public void openBlockingInterruptable ( ) throws InterruptedException { connectionThread = new Thread ( ( ) -> { Thread thr = new Thread ( ( ) -> super . openBlocking ( ) , "CLI Terminal Connection (uninterruptable)" ) ; thr . start ( ) ; try { thr . join ( ) ; } catch ( InterruptedException ex ) { } } , "CLI Terminal ... | Required to close the connection reading on the terminal otherwise it can t be interrupted . |
22,315 | 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 . t... | Validate the header signature . |
22,316 | 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 ( ) ; switch ( type ) { ... | Parses the input stream to read the header |
22,317 | 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 ( ) ; if ( start == end ) { continue ; } ... | those could be incorporated with above but that would blurry everything . |
22,318 | public static ModelNode createBootUpdates ( final String serverName , final ModelNode domainModel , final ModelNode hostModel , final DomainController domainController , final ExpressionResolver expressionResolver ) { final ManagedServerOperationsFactory factory = new ManagedServerOperationsFactory ( serverName , domai... | Create a list of operations required to a boot a managed server . |
22,319 | private synchronized HostServerGroupEffect getMappableDomainEffect ( PathAddress address , String key , Map < String , Set < String > > map , Resource root ) { if ( requiresMapping ) { map ( root ) ; requiresMapping = false ; } Set < String > mapped = map . get ( key ) ; return mapped != null ? HostServerGroupEffect . ... | Creates an appropriate HSGE for a domain - wide resource of a type that is mappable to server groups |
22,320 | 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 ) { Resource hostResource = root . getChild ( PathElement . path... | Creates an appropriate HSGE for resources in the host tree excluding the server and server - config subtrees |
22,321 | 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 ( ) ; store ( server... | Only call with monitor for this held |
22,322 | public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { for ( AttributeAccess attr : attributes . values ( ) ) { resourceRegistration . registerReadOnlyAttribute ( attr . getAttributeDefinition ( ) , null ) ; } } | Register operations associated with this resource . |
22,323 | public void registerChildren ( ManagementResourceRegistration resourceRegistration ) { for ( ResourceDefinition rd : singletonChildren ) { resourceRegistration . registerSubModel ( rd ) ; } for ( ResourceDefinition rd : wildcardChildren ) { resourceRegistration . registerSubModel ( rd ) ; } } | Register child resources associated with this resource . |
22,324 | public static void installDomainConnectorServices ( final OperationContext context , final ServiceTarget serviceTarget , final ServiceName endpointName , final ServiceName networkInterfaceBinding , final int port , final OptionMap options , final ServiceName securityRealm , final ServiceName saslAuthenticationFactory ,... | Installs a remoting stream server for a domain instance |
22,325 | public static void installManagementChannelServices ( final ServiceTarget serviceTarget , final ServiceName endpointName , final AbstractModelControllerOperationHandlerFactoryService operationHandlerService , final ServiceName modelControllerName , final String channelName , final ServiceName executorServiceName , fina... | Set up the services to create a channel listener and operation handler service . |
22,326 | public static void isManagementResourceRemoveable ( OperationContext context , PathAddress otherManagementEndpoint ) throws OperationFailedException { ModelNode remotingConnector ; try { remotingConnector = context . readResourceFromRoot ( PathAddress . pathAddress ( PathElement . pathElement ( SUBSYSTEM , "jmx" ) , Pa... | 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 . |
22,327 | static void writeCertificates ( final ModelNode result , final Certificate [ ] certificates ) throws CertificateEncodingException , NoSuchAlgorithmException { if ( certificates != null ) { for ( Certificate current : certificates ) { ModelNode certificate = new ModelNode ( ) ; writeCertificate ( certificate , current )... | Populate the supplied response with the model representation of the certificates . |
22,328 | private static MBeanServer setQueryExpServer ( QueryExp query , MBeanServer toSet ) { MBeanServer result = QueryEval . getMBeanServer ( ) ; query . setMBeanServer ( toSet ) ; return result ; } | Set the mbean server on the QueryExp and try and pass back any previously set one |
22,329 | PathAddress toPathAddress ( final ObjectName name ) { return ObjectNameAddressUtil . toPathAddress ( rootObjectInstance . getObjectName ( ) , getRootResourceAndRegistration ( ) . getRegistration ( ) , name ) ; } | Convert an ObjectName to a PathAddress . |
22,330 | public static TransactionalProtocolClient createClient ( final ManagementChannelHandler channelAssociation ) { final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl ( channelAssociation ) ; channelAssociation . addHandlerFactory ( client ) ; return client ; } | Create a transactional protocol client . |
22,331 | public static TransactionalProtocolClient . Operation wrap ( final ModelNode operation , final OperationMessageHandler messageHandler , final OperationAttachments attachments ) { return new TransactionalOperationImpl ( operation , messageHandler , attachments ) ; } | Wrap an operation s parameters in a simple encapsulating object |
22,332 | public static TransactionalProtocolClient . PreparedOperation < TransactionalProtocolClient . Operation > executeBlocking ( final ModelNode operation , TransactionalProtocolClient client ) throws IOException , InterruptedException { final BlockingQueueOperationListener < TransactionalProtocolClient . Operation > listen... | Execute blocking for a prepared result . |
22,333 | private void init ( ) { if ( initialized . compareAndSet ( false , true ) ) { final RowSorter < ? extends TableModel > rowSorter = table . getRowSorter ( ) ; rowSorter . toggleSortOrder ( 1 ) ; rowSorter . toggleSortOrder ( 1 ) ; final TableColumnModel columnModel = table . getColumnModel ( ) ; columnModel . getColumn ... | Initializes the model |
22,334 | public void execute ( ) throws IOException { try { prepare ( ) ; boolean commitResult = commit ( ) ; if ( commitResult == false ) { throw PatchLogger . ROOT_LOGGER . failedToDeleteBackup ( ) ; } } catch ( PrepareException pe ) { rollback ( ) ; throw PatchLogger . ROOT_LOGGER . failedToDelete ( pe . getPath ( ) ) ; } } | remove files from directory . All - or - nothing operation - if any of the files fails to be removed all deleted files are restored . |
22,335 | public void rollback ( ) throws GitAPIException { try ( Git git = getGit ( ) ) { git . reset ( ) . setMode ( ResetCommand . ResetType . HARD ) . setRef ( HEAD ) . call ( ) ; } } | Reset hard on HEAD . |
22,336 | 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 ( ) ; } } } | Commit all changes if there are uncommitted changes . |
22,337 | static void initializeExtension ( ExtensionRegistry extensionRegistry , String module , ManagementResourceRegistration rootRegistration , ExtensionRegistryType extensionRegistryType ) { try { boolean unknownModule = false ; boolean initialized = false ; for ( Extension extension : Module . loadServiceFromCallerModuleLo... | Initialise an extension module s extensions in the extension registry |
22,338 | 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 , dependents ) ; } dependents . add ... | Must be called with pathEntries lock taken |
22,339 | 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 ) { result . add ( entry ) ; getAllDependent... | Call with pathEntries lock taken |
22,340 | void addOption ( final String value ) { Assert . checkNotNullParam ( "value" , value ) ; synchronized ( options ) { options . add ( value ) ; } } | Adds an option to the Jvm options |
22,341 | @ SuppressWarnings ( "unchecked" ) public static < T > AttachmentKey < T > create ( final Class < ? super T > valueClass ) { return new SimpleAttachmentKey ( valueClass ) ; } | Construct a new simple attachment key . |
22,342 | InputStream openContentStream ( final ContentItem item ) throws IOException { final File file = getFile ( item ) ; if ( file == null ) { throw new IllegalStateException ( ) ; } return new FileInputStream ( file ) ; } | Open a new content stream . |
22,343 | public ModelNode buildExecutableRequest ( CommandContext ctx ) throws Exception { try { for ( FailureDescProvider h : providers ) { effectiveProviders . add ( h ) ; } for ( String ks : ksToStore ) { composite . get ( Util . STEPS ) . add ( ElytronUtil . storeKeyStore ( ctx , ks ) ) ; effectiveProviders . add ( new Fail... | Sort and order steps to avoid unwanted generation |
22,344 | public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; List < ResourceRoot > resourceRoots = DeploymentUtils . allResourceRoots ( deploymentUnit ) ; for ( ResourceRoot resourceRoot : resourceRoots... | Process the deployment root for the manifest . |
22,345 | 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 ; } | 1 . 0 version of parser is different at simple mapperParser |
22,346 | public static DeploymentUnit getTopDeploymentUnit ( DeploymentUnit unit ) { Assert . checkNotNullParam ( "unit" , unit ) ; DeploymentUnit parent = unit . getParent ( ) ; while ( parent != null ) { unit = parent ; parent = unit . getParent ( ) ; } return unit ; } | Get top deployment unit . |
22,347 | protected Connection openConnection ( ) throws IOException { CallbackHandler callbackHandler = null ; SSLContext sslContext = null ; if ( realm != null ) { sslContext = realm . getSSLContext ( ) ; CallbackHandlerFactory handlerFactory = realm . getSecretCallbackHandlerFactory ( ) ; if ( handlerFactory != null ) { Strin... | Connect and register at the remote domain controller . |
22,348 | boolean applyDomainModel ( ModelNode result ) { if ( ! result . hasDefined ( ModelDescriptionConstants . RESULT ) ) { return false ; } final List < ModelNode > bootOperations = result . get ( ModelDescriptionConstants . RESULT ) . asList ( ) ; return callback . applyDomainModel ( bootOperations ) ; } | Apply the remote read domain model result . |
22,349 | public static Thread addShutdownHook ( final Process process ) { final Thread thread = new Thread ( new Runnable ( ) { public void run ( ) { if ( process != null ) { process . destroy ( ) ; try { process . waitFor ( ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } } } } ) ; thread . setDaem... | Adds a shutdown hook for the process . |
22,350 | public void addOrderedChildResourceTypes ( PathAddress resourceAddress , Resource resource ) { Set < String > orderedChildTypes = resource . getOrderedChildTypes ( ) ; if ( orderedChildTypes . size ( ) > 0 ) { orderedChildren . put ( resourceAddress , resource . getOrderedChildTypes ( ) ) ; } } | 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 . |
22,351 | private static Map < String , ServerGroupDeploymentPlanResult > buildServerGroupResults ( Map < UUID , DeploymentActionResult > deploymentActionResults ) { Map < String , ServerGroupDeploymentPlanResult > serverGroupResults = new HashMap < String , ServerGroupDeploymentPlanResult > ( ) ; for ( Map . Entry < UUID , Depl... | Builds the data structures that show the effects of the plan by server group |
22,352 | protected TransformationDescription buildDefault ( final DiscardPolicy discardPolicy , boolean inherited , final AttributeTransformationDescriptionBuilderImpl . AttributeTransformationDescriptionBuilderRegistry registry , List < String > discardedOperations ) { final Map < String , AttributeTransformationDescription > ... | Build the default transformation description . |
22,353 | protected Map < String , OperationTransformer > buildOperationTransformers ( AttributeTransformationDescriptionBuilderImpl . AttributeTransformationDescriptionBuilderRegistry registry ) { final Map < String , OperationTransformer > operations = new HashMap < String , OperationTransformer > ( ) ; for ( final Map . Entry... | Build the operation transformers . |
22,354 | protected List < TransformationDescription > buildChildren ( ) { if ( children . isEmpty ( ) ) { return Collections . emptyList ( ) ; } final List < TransformationDescription > children = new ArrayList < TransformationDescription > ( ) ; for ( final TransformationDescriptionBuilder builder : this . children ) { childre... | Build all children . |
22,355 | 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 , RemotingSubsystemRootResource . WORKER_READ_THREADS . reso... | creates option map for remoting connections |
22,356 | public PersistentResourceXMLDescription getParserDescription ( ) { return PersistentResourceXMLDescription . builder ( ElytronExtension . SUBSYSTEM_PATH , getNameSpace ( ) ) . addAttribute ( ElytronDefinition . DEFAULT_AUTHENTICATION_CONTEXT ) . addAttribute ( ElytronDefinition . INITIAL_PROVIDERS ) . addAttribute ( El... | 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 . |
22,357 | 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 . roleMaps = new Ro... | Reset the internal state of this object back to what it originally was . |
22,358 | 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 = Collection... | Adds a new role to the list of defined roles . |
22,359 | public synchronized Object removeRoleMapping ( final String roleName ) { HashMap < String , RoleMappingImpl > newRoles = new HashMap < String , RoleMappingImpl > ( roleMappings ) ; if ( newRoles . containsKey ( roleName ) ) { RoleMappingImpl removed = newRoles . remove ( roleName ) ; Object removalKey = new Object ( ) ... | Remove a role from the list of defined roles . |
22,360 | 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 . ge... | Undo a prior removal using the supplied undo key . |
22,361 | private Map < Set < ServerIdentity > , ModelNode > getDeploymentOverlayOperations ( ModelNode operation , ModelNode host ) { final PathAddress realAddress = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; if ( realAddress . size ( ) == 0 && COMPOSITE . equals ( operation . get ( OP ) . asString ( ) ) ) { Mo... | 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 |
22,362 | 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 ; } if ( ! readOps . get ( "result" ) . isDefined... | Does the server support log downloads? |
22,363 | public static InetAddress getLocalHost ( ) throws UnknownHostException { InetAddress addr ; try { addr = InetAddress . getLocalHost ( ) ; } catch ( ArrayIndexOutOfBoundsException e ) { addr = InetAddress . getByName ( null ) ; } return addr ; } | Methods returns InetAddress for localhost |
22,364 | public File getBootFile ( ) { if ( bootFile == null ) { synchronized ( this ) { if ( bootFile == null ) { if ( bootFileReset ) { doneBootup . set ( false ) ; sequence . set ( 0 ) ; } if ( bootFileReset && ! interactionPolicy . isReadOnly ( ) && newReloadBootFileName == null ) { bootFile = mainFile ; } else { String boo... | Gets the file from which boot operations should be parsed . |
22,365 | void successfulBoot ( ) throws ConfigurationPersistenceException { synchronized ( this ) { if ( doneBootup . get ( ) ) { return ; } final File copySource ; if ( ! interactionPolicy . isReadOnly ( ) ) { copySource = mainFile ; } else { if ( FilePersistenceUtils . isParentFolderWritable ( mainFile ) ) { copySource = new ... | Notification that boot has completed successfully and the configuration history should be updated |
22,366 | void backup ( ) throws ConfigurationPersistenceException { if ( ! doneBootup . get ( ) ) { return ; } try { if ( ! interactionPolicy . isReadOnly ( ) ) { moveFile ( mainFile , getVersionedFile ( mainFile ) ) ; } else { moveFile ( lastFile , getVersionedFile ( mainFile ) ) ; } int seq = sequence . get ( ) ; int currentH... | Backup the current version of the configuration to the versioned configuration history |
22,367 | void commitTempFile ( File temp ) throws ConfigurationPersistenceException { if ( ! doneBootup . get ( ) ) { return ; } if ( ! interactionPolicy . isReadOnly ( ) ) { FilePersistenceUtils . moveTempFileToMain ( temp , mainFile ) ; } else { FilePersistenceUtils . moveTempFileToMain ( temp , lastFile ) ; } } | 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 |
22,368 | void fileWritten ( ) throws ConfigurationPersistenceException { if ( ! doneBootup . get ( ) || interactionPolicy . isReadOnly ( ) ) { return ; } try { FilePersistenceUtils . copyFile ( mainFile , lastFile ) ; } catch ( IOException e ) { throw ControllerLogger . ROOT_LOGGER . failedToBackup ( e , mainFile ) ; } } | Notification that the configuration has been written and its current content should be stored to the . last file |
22,369 | 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 ( ! file . delete ( ) ) { ControllerLogger . ROOT_LOGGER . cannotDeleteFileOrDirector... | note this just logs an error and doesn t throw as its only used to remove old configuration files and shouldn t stop boot |
22,370 | protected void updateModel ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { context . readResource ( PathAddress . EMPTY_ADDRESS , false ) ; Resource resource = context . removeResource ( PathAddress . EMPTY_ADDRESS ) ; recordCapabilitiesAndRequirements ( context , operat... | Performs the update to the persistent configuration model . This default implementation simply removes the targeted resource . |
22,371 | ResultAction executeOperation ( ) { assert isControllingThread ( ) ; try { executing = true ; processStages ( ) ; if ( resultAction == ResultAction . KEEP ) { report ( MessageSeverity . INFO , ControllerLogger . ROOT_LOGGER . operationSucceeded ( ) ) ; } else { report ( MessageSeverity . INFO , ControllerLogger . ROOT_... | Package - protected method used to initiate operation execution . |
22,372 | void logAuditRecord ( ) { trackConfigurationChange ( ) ; if ( ! auditLogged ) { try { AccessAuditContext accessContext = SecurityActions . currentAccessAuditContext ( ) ; Caller caller = getCaller ( ) ; auditLogger . log ( isReadOnly ( ) , resultAction , caller == null ? null : caller . getName ( ) , accessContext == n... | Log an audit record of this operation . |
22,373 | private void processStages ( ) { ModelNode primaryResponse = null ; Step step ; do { step = steps . get ( currentStage ) . pollFirst ( ) ; if ( step == null ) { if ( currentStage == Stage . MODEL && addModelValidationSteps ( ) ) { continue ; } if ( ! tryStageCompleted ( currentStage ) ) { resultAction = ResultAction . ... | Perform the work of processing the various OperationContext . Stage queues and then the DONE stage . |
22,374 | private void checkUndefinedNotification ( Notification notification ) { String type = notification . getType ( ) ; PathAddress source = notification . getSource ( ) ; Map < String , NotificationEntry > descriptions = getRootResourceRegistration ( ) . getNotificationDescriptions ( source , true ) ; if ( ! descriptions .... | Check that each emitted notification is properly described by its source . |
22,375 | private ResultAction getFailedResultAction ( Throwable cause ) { if ( currentStage == Stage . MODEL || cancelled || isRollbackOnRuntimeFailure ( ) || isRollbackOnly ( ) || ( cause != null && ! ( cause instanceof OperationFailedException ) ) ) { return ResultAction . ROLLBACK ; } return ResultAction . KEEP ; } | Decide whether failure should trigger a rollback . |
22,376 | 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 ; synchronized ( t... | Gets whether the given server can be updated . |
22,377 | 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 ( FAILURE_... | Records the result of updating a server . |
22,378 | 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 . |
22,379 | 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 ; } | Gets the first value for the key . |
22,380 | public Collection < Argument > getArguments ( final String key ) { final Collection < Argument > args = map . get ( key ) ; if ( args != null ) { return new ArrayList < > ( args ) ; } return Collections . emptyList ( ) ; } | Gets the value for the key . |
22,381 | 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 ; } | Returns the arguments as a list in their command line form . |
22,382 | 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 ) ; l... | 1 . 5 and on 2 . 0 and on 3 . 0 and on . |
22,383 | public void merge ( final ResourceRoot additionalResourceRoot ) { if ( ! additionalResourceRoot . getRoot ( ) . equals ( root ) ) { throw ServerLogger . ROOT_LOGGER . cannotMergeResourceRoot ( root , additionalResourceRoot . getRoot ( ) ) ; } usePhysicalCodeSource = additionalResourceRoot . usePhysicalCodeSource ; if (... | Merges information from the resource root into this resource root |
22,384 | public void registerTransformers ( SubsystemTransformerRegistration subsystemRegistration ) { ResourceTransformationDescriptionBuilder builder = ResourceTransformationDescriptionBuilder . Factory . createSubsystemInstance ( ) ; builder . addChildResource ( DeploymentPermissionsResourceDefinition . DEPLOYMENT_PERMISSION... | Registers the transformers for JBoss EAP 7 . 0 . 0 . |
22,385 | 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 ( ) ; item . get ( ABSOLUTE_ADDRESS ) . set ( pa . toModelNode ( ) ... | Report on the filtered data in DMR . |
22,386 | public PatchingResult rollbackLast ( final ContentVerificationPolicy contentPolicy , final boolean resetConfiguration , InstallationManager . InstallationModification modification ) throws PatchingException { String patchId ; final List < String > oneOffs = modification . getPatchIDs ( ) ; if ( oneOffs . isEmpty ( ) ) ... | Rollback the last applied patch . |
22,387 | 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 ) { assert history . getCumulativePatchI... | Restore the recorded state from the rollback xml . |
22,388 | 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 . ... | Port forward missing module changes for each layer . |
22,389 | 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 > ( ) ; prepareTasks ( context... | Execute all recorded tasks . |
22,390 | 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 Pa... | Prepare all tasks . |
22,391 | static PatchingTask createTask ( final PatchingTasks . ContentTaskDefinition definition , final PatchContentProvider provider , final IdentityPatchContext . PatchEntry context ) { final PatchContentLoader contentLoader = provider . getLoader ( definition . getTarget ( ) . getPatchId ( ) ) ; final PatchingTaskDescriptio... | Create the patching task based on the definition . |
22,392 | static void checkUpgradeConditions ( final UpgradeCondition condition , final InstallationManager . MutablePatchingTarget target ) throws PatchingException { for ( final String required : condition . getRequires ( ) ) { if ( ! target . isApplied ( required ) ) { throw PatchLogger . ROOT_LOGGER . requiresPatch ( require... | Check whether the patch can be applied to a given target . |
22,393 | public static List < DomainControllerData > domainControllerDataFromByteBuffer ( byte [ ] buffer ) throws Exception { List < DomainControllerData > retval = new ArrayList < DomainControllerData > ( ) ; if ( buffer == null ) { return retval ; } ByteArrayInputStream in_stream = new ByteArrayInputStream ( buffer ) ; DataI... | Get the domain controller data from the given byte buffer . |
22,394 | 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 < DomainControllerData > iter = d... | Write the domain controller data to a byte buffer . |
22,395 | private boolean canSuccessorProceed ( ) { if ( predecessor != null && ! predecessor . canSuccessorProceed ( ) ) { return false ; } synchronized ( this ) { while ( responseCount < groups . size ( ) ) { try { wait ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; return false ; } } r... | Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to execute once this policy s plans are successfully completed . |
22,396 | public void recordServerGroupResult ( final String serverGroup , final boolean failed ) { synchronized ( this ) { if ( groups . contains ( serverGroup ) ) { responseCount ++ ; if ( failed ) { this . failed = true ; } DomainControllerLogger . HOST_CONTROLLER_LOGGER . tracef ( "Recorded group result for '%s': failed = %s... | Records the result of updating a server group . |
22,397 | @ SuppressWarnings ( "deprecation" ) protected ModelNode executeReadOnlyOperation ( final ModelNode operation , final OperationMessageHandler handler , final OperationTransactionControl control , final OperationStepHandler prepareStep , final int operationId ) { final AbstractOperationContext delegateContext = getDeleg... | Executes an operation on the controller latching onto an existing transaction |
22,398 | 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 . |
22,399 | protected synchronized void handleCompleted ( ) { latch . countDown ( ) ; for ( final ShutdownListener listener : listeners ) { listener . handleCompleted ( ) ; } listeners . clear ( ) ; } | Notify all shutdown listeners that the shutdown completed . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.