incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raffaele P. Guidi" <raffaele.p.gu...@gmail.com>
Subject Re: [jira] [Created] (DIRECTMEMORY-31) Cache configuration from config file
Date Thu, 03 Nov 2011 22:00:58 GMT
This could be a nice addition. In any case I would leave to the programmer
choice whether using a (let's say) init(param1, param2) or
initFromConfig(<optional filename>)

On Thu, Nov 3, 2011 at 7:35 PM, Igor Babalich (Created) (JIRA) <
jira@apache.org> wrote:

> Cache configuration from config file
> ------------------------------------
>
>                 Key: DIRECTMEMORY-31
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-31
>             Project: Apache DirectMemory
>          Issue Type: New Feature
>            Reporter: Igor Babalich
>
>
> Cache manager looks for 'directmemory.config.file' system property.
> If it is found, it will use that file for instantiation of the caches.
>
> The config file could be like this ( groovy config file ):
> -----------------------------------------------------------
> version=1
>
> cache {
>   photos {
>      numberOfBuffers=10
>      bufferSize="5 Mb"
>      timeToLive="24 hours"
>   }
>   users {
>      numberOfBuffers=2
>      bufferSize=1000000
>      timeToLive="60 minutes"
>      timeToIdle="20 minutes"
>   }
> }
> ------------------------------------------------------------
>
> If 'directmemory.config.file' system property is not found then cache
> manager will report a warning in the logfile and
> try to find a default configuration file in the classpath with the name
> 'directmemory_config.groovy'
>
> Caches can be also initialized by providing a parameter to the cache
> manager with the configuration file's path, like
> CacheManager.init('/path/to/config/mycache_config.groovy')
>
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message