idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
146,000
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 .
146,001
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 .
146,002
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 .
146,003
public static Connection connectSync ( final ProtocolConnectionConfiguration configuration ) throws IOException { long timeoutMillis = configuration . getConnectionTimeout ( ) ; CallbackHandler handler = configuration . getCallbackHandler ( ) ; final CallbackHandler actualHandler ; ProtocolTimeoutHandler timeoutHandler...
Connect sync .
146,004
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 .
146,005
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 .
146,006
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
146,007
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 .
146,008
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 .
146,009
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
146,010
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
146,011
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
146,012
public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { for ( AttributeAccess attr : attributes . values ( ) ) { resourceRegistration . registerReadOnlyAttribute ( attr . getAttributeDefinition ( ) , null ) ; } }
Register operations associated with this resource .
146,013
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 .
146,014
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
146,015
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 .
146,016
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 .
146,017
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 .
146,018
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
146,019
PathAddress toPathAddress ( final ObjectName name ) { return ObjectNameAddressUtil . toPathAddress ( rootObjectInstance . getObjectName ( ) , getRootResourceAndRegistration ( ) . getRegistration ( ) , name ) ; }
Convert an ObjectName to a PathAddress .
146,020
public static TransactionalProtocolClient createClient ( final ManagementChannelHandler channelAssociation ) { final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl ( channelAssociation ) ; channelAssociation . addHandlerFactory ( client ) ; return client ; }
Create a transactional protocol client .
146,021
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
146,022
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 .
146,023
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
146,024
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 .
146,025
public void rollback ( ) throws GitAPIException { try ( Git git = getGit ( ) ) { git . reset ( ) . setMode ( ResetCommand . ResetType . HARD ) . setRef ( HEAD ) . call ( ) ; } }
Reset hard on HEAD .
146,026
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 .
146,027
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
146,028
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
146,029
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
146,030
void addOption ( final String value ) { Assert . checkNotNullParam ( "value" , value ) ; synchronized ( options ) { options . add ( value ) ; } }
Adds an option to the Jvm options
146,031
@ SuppressWarnings ( "unchecked" ) public static < T > AttachmentKey < T > create ( final Class < ? super T > valueClass ) { return new SimpleAttachmentKey ( valueClass ) ; }
Construct a new simple attachment key .
146,032
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 .
146,033
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
146,034
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 .
146,035
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
146,036
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 .
146,037
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 .
146,038
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 .
146,039
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 .
146,040
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 .
146,041
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
146,042
protected TransformationDescription buildDefault ( final DiscardPolicy discardPolicy , boolean inherited , final AttributeTransformationDescriptionBuilderImpl . AttributeTransformationDescriptionBuilderRegistry registry , List < String > discardedOperations ) { final Map < String , AttributeTransformationDescription > ...
Build the default transformation description .
146,043
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 .
146,044
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 .
146,045
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
146,046
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 .
146,047
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 .
146,048
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 .
146,049
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 .
146,050
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 .
146,051
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
146,052
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?
146,053
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
146,054
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 .
146,055
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
146,056
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
146,057
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
146,058
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
146,059
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
146,060
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 .
146,061
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 .
146,062
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 .
146,063
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 .
146,064
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 .
146,065
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 .
146,066
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 .
146,067
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 .
146,068
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 .
146,069
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 .
146,070
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 .
146,071
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 .
146,072
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 .
146,073
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
146,074
public void registerTransformers ( SubsystemTransformerRegistration subsystemRegistration ) { ResourceTransformationDescriptionBuilder builder = ResourceTransformationDescriptionBuilder . Factory . createSubsystemInstance ( ) ; builder . addChildResource ( DeploymentPermissionsResourceDefinition . DEPLOYMENT_PERMISSION...
Registers the transformers for JBoss EAP 7 . 0 . 0 .
146,075
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 .
146,076
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 .
146,077
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 .
146,078
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 .
146,079
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 .
146,080
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 .
146,081
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 .
146,082
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 .
146,083
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 .
146,084
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 .
146,085
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 .
146,086
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 .
146,087
@ 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
146,088
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 .
146,089
protected synchronized void handleCompleted ( ) { latch . countDown ( ) ; for ( final ShutdownListener listener : listeners ) { listener . handleCompleted ( ) ; } listeners . clear ( ) ; }
Notify all shutdown listeners that the shutdown completed .
146,090
public boolean hasDeploymentSubsystemModel ( final String subsystemName ) { final Resource root = deploymentUnit . getAttachment ( DEPLOYMENT_RESOURCE ) ; final PathElement subsystem = PathElement . pathElement ( SUBSYSTEM , subsystemName ) ; return root . hasChild ( subsystem ) ; }
Checks to see if a subsystem resource has already been registered for the deployment .
146,091
public ModelNode getDeploymentSubsystemModel ( final String subsystemName ) { assert subsystemName != null : "The subsystemName cannot be null" ; return getDeploymentSubModel ( subsystemName , PathAddress . EMPTY_ADDRESS , null , deploymentUnit ) ; }
Get the subsystem deployment model root .
146,092
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 . EMPTY_ADDRESS...
Registers the resource to the parent deployment resource . The model returned is that of the resource parameter .
146,093
static Resource getOrCreateSubDeployment ( final String deploymentName , final DeploymentUnit parent ) { final Resource root = parent . getAttachment ( DEPLOYMENT_RESOURCE ) ; return getOrCreate ( root , PathElement . pathElement ( SUBDEPLOYMENT , deploymentName ) ) ; }
Gets or creates the a resource for the sub - deployment on the parent deployments resource .
146,094
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 ( SUBDEPLOYMENT ) ) { resource...
Cleans up the subsystem children for the deployment and each sub - deployment resource .
146,095
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 ) ; }
Resolves the base directory . If the system property is set that value will be used . Otherwise the path is resolved from the home directory .
146,096
static Path resolvePath ( final Path base , final String ... paths ) { return Paths . get ( base . toString ( ) , paths ) ; }
Resolves a path relative to the base path .
146,097
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 > validChild...
Gets the addresses of the child resources under the given resource .
146,098
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 .
146,099
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 .