Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
e318a9a8
Commit
e318a9a8
authored
Jul 23, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Небольшая правка типов и корректировка todo
parent
9a213101
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
TODO
TODO
+3
-1
UInterface.h
include/UInterface.h
+7
-7
No files found.
TODO
View file @
e318a9a8
...
...
@@ -81,11 +81,13 @@ SM: подумать насчёт асинхронности публикаци
SM: Подумать насчёт применения https://github.com/efficient/libcuckoo
DB: Сделать регулируемый буфер на INSERT-ы БД, чтобы поберечь винт (DBServer_PGSQL, DBServer_MySQL...) // по времени или по количеству
в ThreadCreator использовать std::function()..
Сделать в UActivator в обработчике SEGFAULT вывод trace (man 2 backtrace или google/libcoredumper)
ВОЗМОЖНО СТОИТ:
libcommoncpp ==> libpoco (http://pocoproject.org/documentation/index.html)
version 3
...
...
include/UInterface.h
View file @
e318a9a8
...
...
@@ -43,7 +43,7 @@
namespace
UniversalIO
{
/*! Время ожидания ответа */
const
unsigned
in
t
defaultTimeOut
=
3
;
// [сек]
const
timeout_
t
defaultTimeOut
=
3
;
// [сек]
}
// -----------------------------------------------------------------------------------------
...
...
@@ -239,7 +239,7 @@ class UInterface
// ---------------------------------------------------------------
// Вспомогательный класс для кэширования ссылок на удалённые объекты
inline
void
setCacheMaxSize
(
unsigned
in
t
newsize
)
inline
void
setCacheMaxSize
(
size_
t
newsize
)
{
rcache
.
setMaxSize
(
newsize
);
}
...
...
@@ -248,7 +248,7 @@ class UInterface
class
CacheOfResolve
{
public
:
CacheOfResolve
(
unsigned
int
maxsize
,
in
t
cleancount
=
20
)
:
CacheOfResolve
(
size_t
maxsize
,
size_
t
cleancount
=
20
)
:
MaxSize
(
maxsize
),
minCallCount
(
cleancount
)
{};
~
CacheOfResolve
()
{};
...
...
@@ -256,7 +256,7 @@ class UInterface
void
cache
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
,
UniSetTypes
::
ObjectVar
ptr
)
const
;
void
erase
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
;
inline
void
setMaxSize
(
unsigned
in
t
ms
)
inline
void
setMaxSize
(
size_
t
ms
)
{
MaxSize
=
ms
;
};
...
...
@@ -279,7 +279,7 @@ class UInterface
Info
()
:
ptr
(
NULL
),
ncall
(
0
)
{}
UniSetTypes
::
ObjectVar
ptr
;
unsigned
long
ncall
;
// счётчик обращений
size_t
ncall
;
// счётчик обращений
bool
operator
<
(
const
CacheOfResolve
::
Info
&
rhs
)
const
{
...
...
@@ -290,8 +290,8 @@ class UInterface
typedef
std
::
unordered_map
<
int
,
Info
>
CacheMap
;
mutable
CacheMap
mcache
;
mutable
UniSetTypes
::
uniset_rwmutex
cmutex
;
unsigned
in
t
MaxSize
;
/*!< максимальный размер кэша */
unsigned
in
t
minCallCount
;
/*!< минимальное количество вызовов, меньше которого ссылка считается устаревшей */
size_
t
MaxSize
;
/*!< максимальный размер кэша */
size_
t
minCallCount
;
/*!< минимальное количество вызовов, меньше которого ссылка считается устаревшей */
};
void
initBackId
(
UniSetTypes
::
ObjectId
backid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment