You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Oleg Artyukevich (JIRA)" <ji...@apache.org> on 2014/02/11 15:41:19 UTC

[jira] [Updated] (CAY-1873) Move DataDomain cache configuration from the Modeler and into DI

     [ https://issues.apache.org/jira/browse/CAY-1873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Artyukevich updated CAY-1873:
----------------------------------

    Attachment: cay1873_test.patch
                cay1873.patch
                cay1873_modeler.patch

cay1873_modeler.patch : 
Clean up modeler from cache configuration in DataDomain. 

cay1873.patch :
Creates DataRowStoreFactory. The default implementation of it (DefaultDataRowStoreFactory) creates new DataRowStore object using RuntimeProperties. Since this patch, DataRowStore will have only 2 parameters: size, expiration period. 
	Default factory also connects EventBridge using DI. It injects EventBridgeFactory and configures bridge. For this purposes EventBridgeFactory providers for default bridges (XMPP, JMS, JavaGroups) was created. Providers try to get parameters of EventBridge from RuntimeProperties and return EventBridgeFactory. We can also put parameters of future EventBridge object manually using “set” methods from EventBridge factories. 
  	If we don't want to have any EventBridge in DataRowStore then we should use EmptyBridgeFactoryProvider in Module. It will return factory that will not generate any EventBridge. Using this method we get rid from boolean parameter DataRowStore.notifyingRemoteListeners that showed us if we should configure EventBridge or not. 
	To generate EventBridge we use EventBridgeFactory get from EventBridgeFactoryProvider, using parameters from RuntimeProperty->”set” methods->default parameters.

Summarize: DataRowStoreFactory generates DataRowStore using RuntimeProperties (get size and expiration period). Connects EventBridge using inject EventBridgeFactory. Module should contain DataRowStoreFactory and EventBridgeFactory.

cay1873_test.patch :
Tests for :
 - DefaultDataRowStoreFactory
 - default providers of EventBridgeFactory (XMPP, JMS, JavaGroups)
 - change tests for default EventBridge factories

> Move DataDomain cache configuration from the Modeler and into DI
> ----------------------------------------------------------------
>
>                 Key: CAY-1873
>                 URL: https://issues.apache.org/jira/browse/CAY-1873
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>         Attachments: cay1873.patch, cay1873_modeler.patch, cay1873_test.patch, x.png
>
>
> Cache configuration for DataDomain is currently done in the Modeler. (this configuration is limited to the "object cache" [1], query cache is configured in DI already)  and this seems misplaced. Cache settings are highly environment dependent and are better managed by DI. So let's remove all these screens from the Modeler and create any needed DI services that perform this configuration function.
> (The next step, outside the scope of this Jira, may be combining query cache and object cache in the same cache engine)
> [1] http://cayenne.apache.org/docs/3.0/caching-and-fresh-data.html



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)