idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
145,700 | private boolean markAsObsolete ( ContentReference ref ) { if ( obsoleteContents . containsKey ( ref . getHexHash ( ) ) ) { if ( obsoleteContents . get ( ref . getHexHash ( ) ) + obsolescenceTimeout < System . currentTimeMillis ( ) ) { DeploymentRepositoryLogger . ROOT_LOGGER . obsoleteContentCleaned ( ref . getContentI... | Mark content as obsolete . If content was already marked for obsolescenceTimeout ms then it is removed . |
145,701 | static ReadMasterDomainModelUtil readMasterDomainResourcesForInitialConnect ( final Transformers transformers , final Transformers . TransformationInputs transformationInputs , final Transformers . ResourceIgnoredTransformationRegistry ignoredTransformationRegistry , final Resource domainRoot ) throws OperationFailedEx... | Used to read the domain model when a slave host connects to the DC |
145,702 | private List < ModelNode > describeAsNodeList ( PathAddress rootAddress , final Resource resource , boolean isRuntimeChange ) { final List < ModelNode > list = new ArrayList < ModelNode > ( ) ; describe ( rootAddress , resource , list , isRuntimeChange ) ; return list ; } | Describe the model as a list of resources with their address and model which the HC can directly apply to create the model . Although the format might appear similar as the operations generated at boot - time this description is only useful to create the resource tree and cannot be used to invoke any operation . |
145,703 | public static RequiredConfigurationHolder populateHostResolutionContext ( final HostInfo hostInfo , final Resource root , final ExtensionRegistry extensionRegistry ) { final RequiredConfigurationHolder rc = new RequiredConfigurationHolder ( ) ; for ( IgnoredNonAffectedServerGroupsUtil . ServerConfigInfo info : hostInfo... | Process the host info and determine which configuration elements are required on the slave host . |
145,704 | static void processServerConfig ( final Resource root , final RequiredConfigurationHolder requiredConfigurationHolder , final IgnoredNonAffectedServerGroupsUtil . ServerConfigInfo serverConfig , final ExtensionRegistry extensionRegistry ) { final Set < String > serverGroups = requiredConfigurationHolder . serverGroups ... | Determine the relevant pieces of configuration which need to be included when processing the domain model . |
145,705 | public static Transformers . ResourceIgnoredTransformationRegistry createServerIgnoredRegistry ( final RequiredConfigurationHolder rc , final Transformers . ResourceIgnoredTransformationRegistry delegate ) { return new Transformers . ResourceIgnoredTransformationRegistry ( ) { public boolean isResourceTransformationIgn... | Create the ResourceIgnoredTransformationRegistry when fetching missing content only including relevant pieces to a server - config . |
145,706 | public static ModelNode addCurrentServerGroupsToHostInfoModel ( boolean ignoreUnaffectedServerGroups , Resource hostModel , ModelNode model ) { if ( ! ignoreUnaffectedServerGroups ) { return model ; } model . get ( IGNORE_UNUSED_CONFIG ) . set ( ignoreUnaffectedServerGroups ) ; addServerGroupsToModel ( hostModel , mode... | Used by the slave host when creating the host info dmr sent across to the DC during the registration process |
145,707 | public boolean ignoreOperation ( final Resource domainResource , final Collection < ServerConfigInfo > serverConfigs , final PathAddress pathAddress ) { if ( pathAddress . size ( ) == 0 ) { return false ; } boolean ignore = ignoreResourceInternal ( domainResource , serverConfigs , pathAddress ) ; return ignore ; } | For the DC to check whether an operation should be ignored on the slave if the slave is set up to ignore config not relevant to it |
145,708 | public Set < ServerConfigInfo > getServerConfigsOnSlave ( Resource hostResource ) { Set < ServerConfigInfo > groups = new HashSet < > ( ) ; for ( ResourceEntry entry : hostResource . getChildren ( SERVER_CONFIG ) ) { groups . add ( new ServerConfigInfoImpl ( entry . getModel ( ) ) ) ; } return groups ; } | For use on a slave HC to get all the server groups used by the host |
145,709 | private static boolean syncWithMaster ( final Resource domain , final PathElement hostElement ) { final Resource host = domain . getChild ( hostElement ) ; assert host != null ; final Set < String > profiles = new HashSet < > ( ) ; final Set < String > serverGroups = new HashSet < > ( ) ; final Set < String > socketBin... | Determine whether all references are available locally . |
145,710 | public Result cmd ( String cliCommand ) { try { if ( ctx . isWorkflowMode ( ) || ctx . isBatchMode ( ) ) { ctx . handle ( cliCommand ) ; return new Result ( cliCommand , ctx . getExitCode ( ) ) ; } handler . parse ( ctx . getCurrentNodePath ( ) , cliCommand , ctx ) ; if ( handler . getFormat ( ) == OperationFormat . IN... | Execute a CLI command . This can be any command that you might execute on the CLI command line including both server - side operations and local commands such as cd or cn . |
145,711 | protected void boot ( final BootContext context ) throws ConfigurationPersistenceException { List < ModelNode > bootOps = configurationPersister . load ( ) ; ModelNode op = registerModelControllerServiceInitializationBootStep ( context ) ; if ( op != null ) { bootOps . add ( op ) ; } boot ( bootOps , false ) ; finishBo... | Boot the controller . Called during service start . |
145,712 | protected boolean boot ( List < ModelNode > bootOperations , boolean rollbackOnRuntimeFailure ) throws ConfigurationPersistenceException { return boot ( bootOperations , rollbackOnRuntimeFailure , false , ModelControllerImpl . getMutableRootResourceRegistrationProvider ( ) ) ; } | Boot with the given operations performing full model and capability registry validation . |
145,713 | public static < T > T getBundle ( final Class < T > type ) { return doPrivileged ( new PrivilegedAction < T > ( ) { public T run ( ) { final Locale locale = Locale . getDefault ( ) ; final String lang = locale . getLanguage ( ) ; final String country = locale . getCountry ( ) ; final String variant = locale . getVarian... | Get a message bundle of the given type . |
145,714 | public String getName ( ) { if ( name == null && securityIdentity != null ) { name = securityIdentity . getPrincipal ( ) . getName ( ) ; } return name ; } | Obtain the name of the caller most likely a user but could also be a remote process . |
145,715 | public String getRealm ( ) { if ( UNDEFINED . equals ( realm ) ) { Principal principal = securityIdentity . getPrincipal ( ) ; String realm = null ; if ( principal instanceof RealmPrincipal ) { realm = ( ( RealmPrincipal ) principal ) . getRealm ( ) ; } this . realm = realm ; } return this . realm ; } | Obtain the realm used for authentication . |
145,716 | private ModelNode resolveSubsystems ( final List < ModelNode > extensions ) { HostControllerLogger . ROOT_LOGGER . debug ( "Applying extensions provided by master" ) ; final ModelNode result = operationExecutor . installSlaveExtensions ( extensions ) ; if ( ! SUCCESS . equals ( result . get ( OUTCOME ) . asString ( ) )... | Resolve the subsystem versions . |
145,717 | private boolean applyRemoteDomainModel ( final List < ModelNode > bootOperations , final HostInfo hostInfo ) { try { HostControllerLogger . ROOT_LOGGER . debug ( "Applying domain level boot operations provided by master" ) ; SyncModelParameters parameters = new SyncModelParameters ( domainController , ignoredDomainReso... | Apply the remote domain model to the local host controller . |
145,718 | static void rethrowIrrecoverableConnectionFailures ( IOException e ) throws SlaveRegistrationException { Throwable cause = e ; while ( ( cause = cause . getCause ( ) ) != null ) { if ( cause instanceof SaslException ) { throw HostControllerLogger . ROOT_LOGGER . authenticationFailureUnableToConnect ( cause ) ; } else i... | Analyzes a failure thrown connecting to the master for causes that indicate some problem not likely to be resolved by immediately retrying . If found throws an exception highlighting the underlying cause . If the cause is not one of the ones understood by this method the method returns normally . |
145,719 | static void logConnectionException ( URI uri , DiscoveryOption discoveryOption , boolean moreOptions , Exception e ) { if ( uri == null ) { HostControllerLogger . ROOT_LOGGER . failedDiscoveringMaster ( discoveryOption , e ) ; } else { HostControllerLogger . ROOT_LOGGER . cannotConnect ( uri , e ) ; } if ( ! moreOption... | Handles logging tasks related to a failure to connect to a remote HC . |
145,720 | public static AliasOperationTransformer replaceLastElement ( final PathElement element ) { return create ( new AddressTransformer ( ) { public PathAddress transformAddress ( final PathAddress original ) { final PathAddress address = original . subAddress ( 0 , original . size ( ) - 1 ) ; return address . append ( eleme... | Replace the last element of an address with a static path element . |
145,721 | void persist ( final String key , final String value , final boolean enableDisableMode , final boolean disable , final File file ) throws IOException , StartException { persist ( key , value , enableDisableMode , disable , file , null ) ; } | Implement the persistence handler for storing the group properties . |
145,722 | void persist ( final String key , final String value , final boolean enableDisableMode , final boolean disable , final File file , final String realm ) throws IOException , StartException { final PropertiesFileLoader propertiesHandler = realm == null ? new PropertiesFileLoader ( file . getAbsolutePath ( ) , null ) : ne... | Implement the persistence handler for storing the user properties . |
145,723 | public static ServiceName deploymentUnitName ( String name , Phase phase ) { return JBOSS_DEPLOYMENT_UNIT . append ( name , phase . name ( ) ) ; } | Get the service name of a top - level deployment unit . |
145,724 | protected void updateModel ( final ModelNode operation , final Resource resource ) throws OperationFailedException { updateModel ( operation , resource . getModel ( ) ) ; } | Update the given resource in the persistent configuration model based on the values in the given operation . |
145,725 | public void logAttributeWarning ( PathAddress address , String attribute ) { logAttributeWarning ( address , null , null , attribute ) ; } | Log a warning for the resource at the provided address and a single attribute . The detail message is a default Attributes are not understood in the target model version and this resource will need to be ignored on the target host . |
145,726 | public void logAttributeWarning ( PathAddress address , Set < String > attributes ) { logAttributeWarning ( address , null , null , attributes ) ; } | Log a warning for the resource at the provided address and the given attributes . The detail message is a default Attributes are not understood in the target model version and this resource will need to be ignored on the target host . |
145,727 | public void logAttributeWarning ( PathAddress address , String message , String attribute ) { logAttributeWarning ( address , null , message , attribute ) ; } | Log warning for the resource at the provided address and single attribute using the provided detail message . |
145,728 | public void logAttributeWarning ( PathAddress address , String message , Set < String > attributes ) { messageQueue . add ( new AttributeLogEntry ( address , null , message , attributes ) ) ; } | Log a warning for the resource at the provided address and the given attributes using the provided detail message . |
145,729 | public void logAttributeWarning ( PathAddress address , ModelNode operation , String message , String attribute ) { messageQueue . add ( new AttributeLogEntry ( address , operation , message , attribute ) ) ; } | Log a warning for the given operation at the provided address for the given attribute using the provided detail message . |
145,730 | public void logAttributeWarning ( PathAddress address , ModelNode operation , String message , Set < String > attributes ) { messageQueue . add ( new AttributeLogEntry ( address , operation , message , attributes ) ) ; } | Log a warning for the given operation at the provided address for the given attributes using the provided detail message . |
145,731 | public void logWarning ( final String message ) { messageQueue . add ( new LogEntry ( ) { public String getMessage ( ) { return message ; } } ) ; } | Log a free - form warning |
145,732 | void flushLogQueue ( ) { Set < String > problems = new LinkedHashSet < String > ( ) ; synchronized ( messageQueue ) { Iterator < LogEntry > i = messageQueue . iterator ( ) ; while ( i . hasNext ( ) ) { problems . add ( "\t\t" + i . next ( ) . getMessage ( ) + "\n" ) ; i . remove ( ) ; } } if ( ! problems . isEmpty ( ) ... | flushes log queue this actually writes combined log message into system log |
145,733 | PatchEntry getEntry ( final String name , boolean addOn ) { return addOn ? addOns . get ( name ) : layers . get ( name ) ; } | Get a patch entry for either a layer or add - on . |
145,734 | protected void failedToCleanupDir ( final File file ) { checkForGarbageOnRestart = true ; PatchLogger . ROOT_LOGGER . cannotDeleteFile ( file . getAbsolutePath ( ) ) ; } | In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not referenced directories and files . |
145,735 | protected PatchEntry resolveForElement ( final PatchElement element ) throws PatchingException { assert state == State . NEW ; final PatchElementProvider provider = element . getProvider ( ) ; final String layerName = provider . getName ( ) ; final LayerType layerType = provider . getLayerType ( ) ; final Map < String ... | Get the target entry for a given patch element . |
145,736 | private void complete ( final InstallationManager . InstallationModification modification , final FinalizeCallback callback ) { final List < File > processed = new ArrayList < File > ( ) ; List < File > reenabled = Collections . emptyList ( ) ; List < File > disabled = Collections . emptyList ( ) ; try { try { if ( sta... | Complete the current operation and persist the current state to the disk . This will also trigger the invalidation of outdated modules . |
145,737 | boolean undoChanges ( ) { final State state = stateUpdater . getAndSet ( this , State . ROLLBACK_ONLY ) ; if ( state == State . COMPLETED || state == State . ROLLBACK_ONLY ) { return false ; } PatchingTaskContext . Mode currentMode = this . mode ; mode = PatchingTaskContext . Mode . UNDO ; final PatchContentLoader load... | Internally undo recorded changes we did so far . |
145,738 | static void undoChanges ( final PatchEntry entry , final PatchContentLoader loader ) { final List < ContentModification > modifications = new ArrayList < ContentModification > ( entry . rollbackActions ) ; for ( final ContentModification modification : modifications ) { final ContentItem item = modification . getItem (... | Undo changes for a single patch entry . |
145,739 | private void recordRollbackLoader ( final String patchId , PatchableTarget . TargetInfo target ) { final DirectoryStructure structure = target . getDirectoryStructure ( ) ; final InstalledImage image = structure . getInstalledImage ( ) ; final File historyDir = image . getPatchHistoryDir ( patchId ) ; final File miscRo... | Add a rollback loader for a give patch . |
145,740 | protected void recordContentLoader ( final String patchID , final PatchContentLoader contentLoader ) { if ( contentLoaders . containsKey ( patchID ) ) { throw new IllegalStateException ( "Content loader already registered for patch " + patchID ) ; } contentLoaders . put ( patchID , contentLoader ) ; } | Record a content loader for a given patch id . |
145,741 | public File getTargetFile ( final MiscContentItem item ) { final State state = this . state ; if ( state == State . NEW || state == State . ROLLBACK_ONLY ) { return getTargetFile ( miscTargetRoot , item ) ; } else { throw new IllegalStateException ( ) ; } } | Get the target file for misc items . |
145,742 | protected Patch createProcessedPatch ( final Patch original ) { final List < PatchElement > elements = new ArrayList < PatchElement > ( ) ; for ( final PatchEntry entry : getLayers ( ) ) { final PatchElement element = createPatchElement ( entry , entry . element . getId ( ) , entry . modifications ) ; elements . add ( ... | Create a patch representing what we actually processed . This may contain some fixed content hashes for removed modules . |
145,743 | protected RollbackPatch createRollbackPatch ( final String patchId , final Patch . PatchType patchType ) { final List < PatchElement > elements = new ArrayList < PatchElement > ( ) ; for ( final PatchEntry entry : getLayers ( ) ) { final PatchElement element = createRollbackElement ( entry ) ; elements . add ( element ... | Create a rollback patch based on the recorded actions . |
145,744 | static File getTargetFile ( final File root , final MiscContentItem item ) { return PatchContentLoader . getMiscPath ( root , item ) ; } | Get a misc file . |
145,745 | protected static PatchElement createRollbackElement ( final PatchEntry entry ) { final PatchElement patchElement = entry . element ; final String patchId ; final Patch . PatchType patchType = patchElement . getProvider ( ) . getPatchType ( ) ; if ( patchType == Patch . PatchType . CUMULATIVE ) { patchId = entry . getCu... | Create a patch element for the rollback patch . |
145,746 | protected static PatchElement createPatchElement ( final PatchEntry entry , String patchId , final List < ContentModification > modifications ) { final PatchElement patchElement = entry . element ; final PatchElementImpl element = new PatchElementImpl ( patchId ) ; element . setProvider ( patchElement . getProvider ( )... | Copy a patch element |
145,747 | void backupConfiguration ( ) throws IOException { final String configuration = Constants . CONFIGURATION ; final File a = new File ( installedImage . getAppClientDir ( ) , configuration ) ; final File d = new File ( installedImage . getDomainDir ( ) , configuration ) ; final File s = new File ( installedImage . getStan... | Backup the current configuration as part of the patch history . |
145,748 | static void backupDirectory ( final File source , final File target ) throws IOException { if ( ! target . exists ( ) ) { if ( ! target . mkdirs ( ) ) { throw PatchLogger . ROOT_LOGGER . cannotCreateDirectory ( target . getAbsolutePath ( ) ) ; } } final File [ ] files = source . listFiles ( CONFIG_FILTER ) ; for ( fina... | Backup all xml files in a given directory . |
145,749 | static void writePatch ( final Patch rollbackPatch , final File file ) throws IOException { final File parent = file . getParentFile ( ) ; if ( ! parent . isDirectory ( ) ) { if ( ! parent . mkdirs ( ) && ! parent . exists ( ) ) { throw PatchLogger . ROOT_LOGGER . cannotCreateDirectory ( file . getAbsolutePath ( ) ) ; ... | Write the patch . xml |
145,750 | public CliCommandBuilder setController ( final String hostname , final int port ) { setController ( formatAddress ( null , hostname , port ) ) ; return this ; } | Sets the hostname and port to connect to . |
145,751 | public CliCommandBuilder setController ( final String protocol , final String hostname , final int port ) { setController ( formatAddress ( protocol , hostname , port ) ) ; return this ; } | Sets the protocol hostname and port to connect to . |
145,752 | public CliCommandBuilder setTimeout ( final int timeout ) { if ( timeout > 0 ) { addCliArgument ( CliArgument . TIMEOUT , Integer . toString ( timeout ) ) ; } else { addCliArgument ( CliArgument . TIMEOUT , null ) ; } return this ; } | Sets the timeout used when connecting to the server . |
145,753 | public static < T > ServiceBuilder < T > addServerExecutorDependency ( ServiceBuilder < T > builder , Injector < ExecutorService > injector ) { return builder . addDependency ( ServerService . MANAGEMENT_EXECUTOR , ExecutorService . class , injector ) ; } | Creates dependency on management executor . |
145,754 | public void handleChannelClosed ( final Channel closed , final IOException e ) { for ( final ActiveOperationImpl < ? , ? > activeOperation : activeRequests . values ( ) ) { if ( activeOperation . getChannel ( ) == closed ) { activeOperation . getResultHandler ( ) . cancel ( ) ; } } } | Receive a notification that the channel was closed . |
145,755 | public boolean awaitCompletion ( long timeout , TimeUnit unit ) throws InterruptedException { long deadline = unit . toMillis ( timeout ) + System . currentTimeMillis ( ) ; lock . lock ( ) ; try { assert shutdown ; while ( activeCount != 0 ) { long remaining = deadline - System . currentTimeMillis ( ) ; if ( remaining ... | Await the completion of all currently active operations . |
145,756 | protected < T , A > ActiveOperation < T , A > registerActiveOperation ( final Integer id , A attachment , ActiveOperation . CompletedCallback < T > callback ) { lock . lock ( ) ; try { final Integer operationId ; if ( id == null ) { operationId = operationIdManager . createBatchId ( ) ; } else { if ( ! operationIdManag... | Register an active operation with a specific operation id . |
145,757 | protected < T , A > ActiveOperation < T , A > getActiveOperation ( final ManagementRequestHeader header ) { return getActiveOperation ( header . getBatchId ( ) ) ; } | Get an active operation . |
145,758 | protected < T , A > ActiveOperation < T , A > getActiveOperation ( final Integer id ) { return ( ActiveOperation < T , A > ) activeRequests . get ( id ) ; } | Get the active operation . |
145,759 | protected List < Integer > cancelAllActiveOperations ( ) { final List < Integer > operations = new ArrayList < Integer > ( ) ; for ( final ActiveOperationImpl < ? , ? > activeOperation : activeRequests . values ( ) ) { activeOperation . asyncCancel ( false ) ; operations . add ( activeOperation . getOperationId ( ) ) ;... | Cancel all currently active operations . |
145,760 | protected < T , A > ActiveOperation < T , A > removeActiveOperation ( Integer id ) { final ActiveOperation < T , A > removed = removeUnderLock ( id ) ; if ( removed != null ) { for ( final Map . Entry < Integer , ActiveRequest < ? , ? > > requestEntry : requests . entrySet ( ) ) { final ActiveRequest < ? , ? > request ... | Remove an active operation . |
145,761 | protected static void safeWriteErrorResponse ( final Channel channel , final ManagementProtocolHeader header , final Throwable error ) { if ( header . getType ( ) == ManagementProtocol . TYPE_REQUEST ) { try { writeErrorResponse ( channel , ( ManagementRequestHeader ) header , error ) ; } catch ( IOException ioe ) { Pr... | Safe write error response . |
145,762 | protected static void writeErrorResponse ( final Channel channel , final ManagementRequestHeader header , final Throwable error ) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader . create ( header , error ) ; final MessageOutputStream output = channel . writeMessage ( ) ; try { wr... | Write an error response . |
145,763 | protected static FlushableDataOutput writeHeader ( final ManagementProtocolHeader header , final OutputStream os ) throws IOException { final FlushableDataOutput output = FlushableDataOutputImpl . create ( os ) ; header . write ( output ) ; return output ; } | Write the management protocol header . |
145,764 | protected static < T , A > ManagementRequestHandler < T , A > getFallbackHandler ( final ManagementRequestHeader header ) { return new ManagementRequestHandler < T , A > ( ) { public void handleRequest ( final DataInput input , ActiveOperation . ResultHandler < T > resultHandler , ManagementRequestContext < A > context... | Get a fallback handler . |
145,765 | static void processFile ( final IdentityPatchContext context , final File file , final PatchingTaskContext . Mode mode ) throws IOException { if ( mode == PatchingTaskContext . Mode . APPLY ) { if ( ENABLE_INVALIDATION ) { updateJar ( file , GOOD_ENDSIG_PATTERN , BAD_BYTE_SKIP , CRIPPLED_ENDSIG , GOOD_ENDSIG ) ; backup... | Process a file . |
145,766 | private static void updateJar ( final File file , final byte [ ] searchPattern , final int [ ] badSkipBytes , final int newSig , final int endSig ) throws IOException { final RandomAccessFile raf = new RandomAccessFile ( file , "rw" ) ; try { final FileChannel channel = raf . getChannel ( ) ; try { long pos = channel .... | Update the central directory signature of a . jar . |
145,767 | private static boolean validateEndRecord ( File file , FileChannel channel , long startEndRecord , long endSig ) throws IOException { try { channel . position ( startEndRecord ) ; final ByteBuffer endDirHeader = getByteBuffer ( ENDLEN ) ; read ( endDirHeader , channel ) ; if ( endDirHeader . limit ( ) < ENDLEN ) { retu... | Validates that the data structure at position startEndRecord has a field in the expected position that points to the start of the first central directory file and if so that the file has a complete end of central directory record comment at the end . |
145,768 | private static long scanForEndSig ( final File file , final FileChannel channel , final ScanContext context ) throws IOException { ByteBuffer bb = getByteBuffer ( CHUNK_SIZE ) ; long start = channel . size ( ) ; long end = Math . max ( 0 , start - MAX_REVERSE_SCAN ) ; long channelPos = Math . max ( 0 , start - CHUNK_SI... | Boyer Moore scan that proceeds backwards from the end of the file looking for endsig |
145,769 | private static long scanForLocSig ( FileChannel channel ) throws IOException { channel . position ( 0 ) ; ByteBuffer bb = getByteBuffer ( CHUNK_SIZE ) ; long end = channel . size ( ) ; while ( channel . position ( ) <= end ) { read ( bb , channel ) ; int bufferPos = 0 ; while ( bufferPos <= bb . limit ( ) - SIG_PATTERN... | Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG |
145,770 | private static boolean validateLocalFileRecord ( FileChannel channel , long startLocRecord , long compressedSize ) throws IOException { ByteBuffer lfhBuffer = getByteBuffer ( LOCLEN ) ; read ( lfhBuffer , channel , startLocRecord ) ; if ( lfhBuffer . limit ( ) < LOCLEN || getUnsignedInt ( lfhBuffer , 0 ) != LOCSIG ) { ... | Checks that the data starting at startLocRecord looks like a local file record header . |
145,771 | private static void computeBadByteSkipArray ( byte [ ] pattern , int [ ] badByteArray ) { for ( int a = 0 ; a < ALPHABET_SIZE ; a ++ ) { badByteArray [ a ] = pattern . length ; } for ( int j = 0 ; j < pattern . length - 1 ; j ++ ) { badByteArray [ pattern [ j ] - Byte . MIN_VALUE ] = pattern . length - j - 1 ; } } | Fills the Boyer Moore bad character array for the given pattern |
145,772 | public static HostController createHostController ( String jbossHomePath , String modulePath , String [ ] systemPackages , String [ ] cmdargs ) { if ( jbossHomePath == null || jbossHomePath . isEmpty ( ) ) { throw EmbeddedLogger . ROOT_LOGGER . invalidJBossHome ( jbossHomePath ) ; } File jbossHomeDir = new File ( jboss... | Create an embedded host controller . |
145,773 | public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final ResourceRoot deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( Attachments . DEPLOYMENT_ROOT ) ; final ModuleSpecification moduleSpecification = phaseContext . getDeploymentUnit ( ) . getAtt... | Add the dependencies if the deployment contains a service activator loader entry . |
145,774 | public void pause ( ServerActivityCallback requestCountListener ) { if ( paused ) { throw ServerLogger . ROOT_LOGGER . serverAlreadyPaused ( ) ; } this . paused = true ; listenerUpdater . set ( this , requestCountListener ) ; if ( activeRequestCountUpdater . get ( this ) == 0 ) { if ( listenerUpdater . compareAndSet ( ... | Pause the current entry point and invoke the provided listener when all current requests have finished . |
145,775 | public void resume ( ) { this . paused = false ; ServerActivityCallback listener = listenerUpdater . get ( this ) ; if ( listener != null ) { listenerUpdater . compareAndSet ( this , listener , null ) ; } } | Cancel the pause operation |
145,776 | public static ModelNode createLocalHostHostInfo ( final LocalHostControllerInfo hostInfo , final ProductConfig productConfig , final IgnoredDomainResourceRegistry ignoredResourceRegistry , final Resource hostModelResource ) { final ModelNode info = new ModelNode ( ) ; info . get ( NAME ) . set ( hostInfo . getLocalHost... | Create the metadata which gets send to the DC when registering . |
145,777 | public void addModuleDir ( final String moduleDir ) { if ( moduleDir == null ) { throw LauncherMessages . MESSAGES . nullParam ( "moduleDir" ) ; } final Path path = Paths . get ( moduleDir ) . normalize ( ) ; modulesDirs . add ( path . toString ( ) ) ; } | Adds a directory to the collection of module paths . |
145,778 | public String getModulePaths ( ) { final StringBuilder result = new StringBuilder ( ) ; if ( addDefaultModuleDir ) { result . append ( wildflyHome . resolve ( "modules" ) . toString ( ) ) ; } if ( ! modulesDirs . isEmpty ( ) ) { if ( addDefaultModuleDir ) result . append ( File . pathSeparator ) ; for ( Iterator < Stri... | Returns the modules paths used on the command line . |
145,779 | public static ModelControllerClient createAndAdd ( final ManagementChannelHandler handler ) { final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient ( handler ) ; handler . addHandlerFactory ( client ) ; return client ; } | Create and add model controller handler to an existing management channel handler . |
145,780 | public static ModelControllerClient createReceiving ( final Channel channel , final ExecutorService executorService ) { final ManagementClientChannelStrategy strategy = ManagementClientChannelStrategy . create ( channel ) ; final ManagementChannelHandler handler = new ManagementChannelHandler ( strategy , executorServi... | Create a model controller client which is exclusively receiving messages on an existing channel . |
145,781 | protected void addLineContent ( BufferedReader bufferedFileReader , List < String > content , String line ) throws IOException { if ( line . startsWith ( COMMENT_PREFIX ) && line . length ( ) == 1 ) { String nextLine = bufferedFileReader . readLine ( ) ; if ( nextLine != null ) { if ( nextLine . startsWith ( COMMENT_PR... | Remove the realm name block . |
145,782 | public void validateOperation ( final ModelNode operation ) throws OperationFailedException { if ( operation . hasDefined ( ModelDescriptionConstants . OPERATION_NAME ) && deprecationData != null && deprecationData . isNotificationUseful ( ) ) { ControllerLogger . DEPRECATED_LOGGER . operationDeprecated ( getName ( ) ,... | Validates operation model against the definition and its parameters |
145,783 | @ SuppressWarnings ( "deprecation" ) public final void validateAndSet ( ModelNode operationObject , final ModelNode model ) throws OperationFailedException { validateOperation ( operationObject ) ; for ( AttributeDefinition ad : this . parameters ) { ad . validateAndSet ( operationObject , model ) ; } } | validates operation against the definition and sets model for the parameters passed . |
145,784 | < P extends PatchingArtifact . ArtifactState , S extends PatchingArtifact . ArtifactState > PatchingArtifactStateHandler < S > getHandlerForArtifact ( PatchingArtifact < P , S > artifact ) { return handlers . get ( artifact ) ; } | Get a state handler for a given patching artifact . |
145,785 | public < V > V getAttachment ( final AttachmentKey < V > key ) { assert key != null ; return key . cast ( contextAttachments . get ( key ) ) ; } | Retrieves an object that has been attached to this context . |
145,786 | public < V > V attach ( final AttachmentKey < V > key , final V value ) { assert key != null ; return key . cast ( contextAttachments . put ( key , value ) ) ; } | Attaches an arbitrary object to this context . |
145,787 | public < V > V attachIfAbsent ( final AttachmentKey < V > key , final V value ) { assert key != null ; return key . cast ( contextAttachments . putIfAbsent ( key , value ) ) ; } | Attaches an arbitrary object to this context only if the object was not already attached . If a value has already been attached with the key provided the current value associated with the key is returned . |
145,788 | public < V > V detach ( final AttachmentKey < V > key ) { assert key != null ; return key . cast ( contextAttachments . remove ( key ) ) ; } | Detaches or removes the value from this context . |
145,789 | private void writeInterfaceCriteria ( final XMLExtendedStreamWriter writer , final ModelNode subModel , final boolean nested ) throws XMLStreamException { for ( final Property property : subModel . asPropertyList ( ) ) { if ( property . getValue ( ) . isDefined ( ) ) { writeInterfaceCriteria ( writer , property , neste... | Write the criteria elements extracting the information of the sub - model . |
145,790 | public static ExtensibleConfigurationPersister createHostXmlConfigurationPersister ( final ConfigurationFile file , final HostControllerEnvironment environment , final ExecutorService executorService , final ExtensionRegistry hostExtensionRegistry , final LocalHostControllerInfo localHostControllerInfo ) { String defau... | host . xml |
145,791 | public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister ( final ConfigurationFile file , ExecutorService executorService , ExtensionRegistry extensionRegistry , final HostControllerEnvironment environment ) { DomainXml domainXml = new DomainXml ( Module . getBootModuleLoader ( ) , executorS... | domain . xml |
145,792 | public static ExtensibleConfigurationPersister createTransientDomainXmlConfigurationPersister ( ExecutorService executorService , ExtensionRegistry extensionRegistry ) { DomainXml domainXml = new DomainXml ( Module . getBootModuleLoader ( ) , executorService , extensionRegistry ) ; ExtensibleConfigurationPersister pers... | slave = true |
145,793 | 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 . |
145,794 | 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 |
145,795 | 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 |
145,796 | 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 |
145,797 | 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 . |
145,798 | 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 . |
145,799 | 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 . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.