Mercurial > hg > ltpda
comparison m-toolbox/classes/@LTPDADatabaseConnectionManager/LTPDADatabaseConnectionManager.m @ 4:e3c5468b1bfe database-connection-manager
Integrate with LTPDAPreferences
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | 18e956c96a1b |
children | 5e7477b94d94 |
comparison
equal
deleted
inserted
replaced
3:960fe1aa1c10 | 4:e3c5468b1bfe |
---|---|
2 | 2 |
3 properties(SetAccess=private) | 3 properties(SetAccess=private) |
4 | 4 |
5 connections = {}; | 5 connections = {}; |
6 credentials = {}; | 6 credentials = {}; |
7 | |
8 p_credentialsExpiry = 3600; | |
9 p_cachePassword = 2; | |
10 p_maxConnectionsNumber = 10; | |
11 | 7 |
12 end % private properties | 8 end % private properties |
13 | 9 |
14 properties(Dependent=true) | 10 properties(Dependent=true) |
15 | 11 |
81 end | 77 end |
82 | 78 |
83 | 79 |
84 function val = get.credentialsExpiry(cm) | 80 function val = get.credentialsExpiry(cm) |
85 % obtain from user preferences | 81 % obtain from user preferences |
86 %p = getappdata(0, 'LTPDApreferences'); | 82 p = getappdata(0, 'LTPDApreferences'); |
87 val = cm.p_credentialsExpiry; | 83 val = double(p.getRepoPrefs().getExpiry()); |
88 end | 84 end |
89 | 85 |
90 | 86 |
91 function val = get.cachePassword(cm) | 87 function val = get.cachePassword(cm) |
92 % obtain from user preferences | 88 % obtain from user preferences |
93 %p = getappdata(0, 'LTPDApreferences'); | 89 p = getappdata(0, 'LTPDApreferences'); |
94 val = cm.p_cachePassword; | 90 val = double(p.getRepoPrefs().getCachePassword()); |
95 end | 91 end |
96 | 92 |
97 | 93 |
98 function val = get.maxConnectionsNumber(cm) | 94 function val = get.maxConnectionsNumber(cm) |
99 % obtain from user preferences | 95 % obtain from user preferences |
100 %p = getappdata(0, 'LTPDApreferences'); | 96 p = getappdata(0, 'LTPDApreferences'); |
101 val = cm.p_maxConnectionsNumber; | 97 val = double(p.getRepoPrefs().getMaxConnectionsNumber()); |
102 end | 98 end |
103 | 99 |
104 | 100 |
105 function n = count(cm) | 101 function n = count(cm) |
106 % COUNT Returns the number of open connections in the connections pool. | 102 % COUNT Returns the number of open connections in the connections pool. |