Java Code Examples for net.spy.memcached.ConnectionFactoryBuilder#setDaemon()

The following examples show how to use net.spy.memcached.ConnectionFactoryBuilder#setDaemon() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MemcacheClientFactoryImpl.java    From simple-spring-memcached with MIT License 4 votes vote down vote up
private void setProviderSpecificSettings(final ConnectionFactoryBuilder builder, final SpymemcachedConfiguration conf) {
    if (conf.getDaemon() != null) {
        builder.setDaemon(conf.getDaemon());
    }

    if (conf.getFailureMode() != null) {
        builder.setFailureMode(conf.getFailureMode());
    }

    if (conf.getHashAlg() != null) {
        builder.setHashAlg(conf.getHashAlg());
    }

    if (conf.getLocatorType() != null) {
        builder.setLocatorType(conf.getLocatorType());
    }

    if (conf.getMaxReconnectDelay() != null) {
        builder.setMaxReconnectDelay(conf.getMaxReconnectDelay());
    }

    if (conf.getOpQueueMaxBlockTime() != null) {
        builder.setOpQueueMaxBlockTime(conf.getOpQueueMaxBlockTime());
    }

    if (conf.getReadBufferSize() != null) {
        builder.setReadBufferSize(conf.getReadBufferSize());
    }

    if (conf.getShouldOptimize() != null) {
        builder.setShouldOptimize(conf.getShouldOptimize());
    }

    if (conf.getTimeoutExceptionThreshold() != null) {
        builder.setTimeoutExceptionThreshold(conf.getTimeoutExceptionThreshold());
    }

    if (conf.getUseNagleAlgorithm() != null) {
        builder.setUseNagleAlgorithm(conf.getUseNagleAlgorithm());
    }

    if (conf.getDefaultTranscoder() != null) {
        builder.setTranscoder(conf.getDefaultTranscoder());
    }

    if (conf.getAuthDescriptor() != null) {
        builder.setAuthDescriptor(conf.getAuthDescriptor());
    }
    
    if (conf.getAuthWaitTime() != null) {
        builder.setAuthWaitTime(conf.getAuthWaitTime());
    }

    if (conf.getInitialObservers() != null) {
        builder.setInitialObservers(conf.getInitialObservers());
    }

    if (conf.getMetricCollector() != null) {
        builder.setMetricCollector(conf.getMetricCollector());
    }

    if (conf.getMetricType() != null) {
        builder.setEnableMetrics(conf.getMetricType());
    }
    
    if (conf.getExecutorService() != null) {
        builder.setListenerExecutorService(conf.getExecutorService());
    }
}
 
Example 2
Source File: MemcacheClientFactoryImpl.java    From simple-spring-memcached with MIT License 4 votes vote down vote up
private void setProviderSpecificSettings(final ConnectionFactoryBuilder builder, final ElastiCacheConfiguration conf) {
    if (conf.getDaemon() != null) {
        builder.setDaemon(conf.getDaemon());
    }

    if (conf.getFailureMode() != null) {
        builder.setFailureMode(conf.getFailureMode());
    }

    if (conf.getHashAlg() != null) {
        builder.setHashAlg(conf.getHashAlg());
    }

    if (conf.getLocatorType() != null) {
        builder.setLocatorType(conf.getLocatorType());
    }

    if (conf.getMaxReconnectDelay() != null) {
        builder.setMaxReconnectDelay(conf.getMaxReconnectDelay());
    }

    if (conf.getOpQueueMaxBlockTime() != null) {
        builder.setOpQueueMaxBlockTime(conf.getOpQueueMaxBlockTime());
    }
    
    if (conf.getOpTimeout() != null) {
        builder.setOpTimeout(conf.getOpTimeout());
    }

    if (conf.getReadBufferSize() != null) {
        builder.setReadBufferSize(conf.getReadBufferSize());
    }

    if (conf.getShouldOptimize() != null) {
        builder.setShouldOptimize(conf.getShouldOptimize());
    }

    if (conf.getTimeoutExceptionThreshold() != null) {
        builder.setTimeoutExceptionThreshold(conf.getTimeoutExceptionThreshold());
    }

    if (conf.getUseNagleAlgorithm() != null) {
        builder.setUseNagleAlgorithm(conf.getUseNagleAlgorithm());
    }

    if (conf.getDefaultTranscoder() != null) {
        builder.setTranscoder(conf.getDefaultTranscoder());
    }

    if (conf.getAuthDescriptor() != null) {
        builder.setAuthDescriptor(conf.getAuthDescriptor());
    }
    
    if (conf.getAuthWaitTime() != null) {
        builder.setAuthWaitTime(conf.getAuthWaitTime());
    }

    if (conf.getInitialObservers() != null) {
        builder.setInitialObservers(conf.getInitialObservers());
    }
    
    if (conf.getClientMode() != null) {
        builder.setClientMode(conf.getClientMode());
    }
    
    if (conf.getEnableMetricType() != null) {
        builder.setEnableMetrics(conf.getEnableMetricType());
    }
    
    if (conf.getMetricCollector() != null) {
        builder.setMetricCollector(conf.getMetricCollector());
    }

}