This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Configuration | |
| public class JettyConfig { | |
| @Autowired | |
| private MetricRegistry metricRegistry; | |
| public Server jettyServer(int maxThreads, int minThreads, int idleTimeout) { | |
| QueuedThreadPool threadPool = new InstrumentedQueuedThreadPool(metricRegistry); | |
| threadPool.setMaxThreads(maxThreads); | |
| threadPool.setMinThreads(minThreads); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.management.ManagementFactory; | |
| import java.lang.management.RuntimeMXBean; | |
| import java.util.Collection; | |
| import java.util.LinkedHashSet; | |
| import org.springframework.boot.actuate.endpoint.PublicMetrics; | |
| import org.springframework.boot.actuate.metrics.Metric; | |
| import org.springframework.core.Ordered; | |
| import com.sun.management.OperatingSystemMXBean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.eclipse.jetty.server.LowResourceMonitor; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.util.thread.QueuedThreadPool; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; | |
| import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | |
| import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory; | |
| import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| import org.springframework.context.annotation.Bean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.net.UnknownHostException; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import org.apache.commons.pool2.impl.GenericObjectPool; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | |
| import org.springframework.boot.autoconfigure.redis.RedisProperties; | |
| import org.springframework.boot.autoconfigure.redis.RedisProperties.Sentinel; | |
| import org.springframework.boot.context.properties.EnableConfigurationProperties; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import com.codahale.metrics.MetricRegistry; | |
| import com.zaxxer.hikari.HikariDataSource; | |
| @Configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.integration.channel.DirectChannel; | |
| import org.springframework.integration.channel.interceptor.WireTap; | |
| import org.springframework.integration.handler.LoggingHandler; | |
| import org.springframework.messaging.MessageChannel; | |
| public final class LoggingUtils { | |
| private static final String DEFAULT_MESSAGE = "'Message: [' + #root + ']'"; | |
| private LoggingUtils() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Bean | |
| public MessageSource<?> amazonS3InboundSynchronizationMessageSource() { | |
| AWSCredentials credentials = new BasicAWSCredentials(this.accessKey, this.secretKey); | |
| AmazonS3InboundSynchronizationMessageSource messageSource = new AmazonS3InboundSynchronizationMessageSource(); | |
| messageSource.setCredentials(credentials); | |
| messageSource.setBucket(bucket); | |
| messageSource.setMaxObjectsPerBatch(maxObjectsPerBatch); | |
| messageSource.setAcceptSubFolders(Boolean.valueOf(acceptSubFolders)); | |
| messageSource.setRemoteDirectory(remoteDirectory); | |
| if (!fileNameWildcard.isEmpty()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SpringIntegrationManagementMetrics implements PublicMetrics, ApplicationContextAware { | |
| private ApplicationContext applicationContext; | |
| @Override | |
| public Collection<Metric<?>> metrics() { | |
| Collection<Metric<?>> result = new LinkedHashSet<Metric<?>>(); | |
| // Collect Spring Integration metrics; if available | |
| // keys in each map are the bean names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # A curated collection of software to be installed via Homebrew | |
| # @author Chris Phillipson | |
| # @lastUpdated 2017-06-05 | |
| # @version 1.2 | |
| # @see http://brew.sh/, https://caskroom.github.io/, and https://github.com/cloudfoundry/homebrew-tap | |
| set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |