diff options
author | Ingela Anderton Andin <[email protected]> | 2011-12-05 12:09:52 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-12-05 12:09:52 +0100 |
commit | e930283dbe0c7aeefb31d535e90b644a993cc0f7 (patch) | |
tree | 1042020e09d532bccc132d8dae10a976e0ac3c3b /lib/ssl/src/ssl_session_cache.erl | |
parent | 9c14afeb742f9e20ead11316a467483d4a0c48ba (diff) | |
parent | 2b8deca534abb8e329cefd354e351d6f05b1f933 (diff) | |
download | otp-e930283dbe0c7aeefb31d535e90b644a993cc0f7.tar.gz otp-e930283dbe0c7aeefb31d535e90b644a993cc0f7.tar.bz2 otp-e930283dbe0c7aeefb31d535e90b644a993cc0f7.zip |
Merge branch 'ia/ssl/dialyzer-R15'
* ia/ssl/dialyzer-R15:
Callback specs now handled by -callback directive in the behaviour module.
Diffstat (limited to 'lib/ssl/src/ssl_session_cache.erl')
-rw-r--r-- | lib/ssl/src/ssl_session_cache.erl | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/ssl/src/ssl_session_cache.erl b/lib/ssl/src/ssl_session_cache.erl index 93969f628f..f9bbf905e1 100644 --- a/lib/ssl/src/ssl_session_cache.erl +++ b/lib/ssl/src/ssl_session_cache.erl @@ -28,27 +28,19 @@ -export([init/1, terminate/1, lookup/2, update/3, delete/2, foldl/3, select_session/2]). --type key() :: {{host(), inet:port_number()}, session_id()} | {inet:port_number(), session_id()}. - %%-------------------------------------------------------------------- --spec init(list()) -> db_handle(). %% Returns reference to the cache (opaque) -%% %% Description: Return table reference. Called by ssl_manager process. %%-------------------------------------------------------------------- init(_) -> ets:new(cache_name(), [set, protected]). %%-------------------------------------------------------------------- --spec terminate(db_handle()) -> any(). -%% %% Description: Handles cache table at termination of ssl manager. %%-------------------------------------------------------------------- terminate(Cache) -> ets:delete(Cache). %%-------------------------------------------------------------------- --spec lookup(db_handle(), key()) -> #session{} | undefined. -%% %% Description: Looks up a cach entry. Should be callable from any %% process. %%-------------------------------------------------------------------- @@ -61,8 +53,6 @@ lookup(Cache, Key) -> end. %%-------------------------------------------------------------------- --spec update(db_handle(), key(), #session{}) -> any(). -%% %% Description: Caches a new session or updates a already cached one. %% Will only be called from the ssl_manager process. %%-------------------------------------------------------------------- @@ -70,8 +60,6 @@ update(Cache, Key, Session) -> ets:insert(Cache, {Key, Session}). %%-------------------------------------------------------------------- --spec delete(db_handle(), key()) -> any(). -%% %% Description: Delets a cache entry. %% Will only be called from the ssl_manager process. %%-------------------------------------------------------------------- @@ -79,8 +67,6 @@ delete(Cache, Key) -> ets:delete(Cache, Key). %%-------------------------------------------------------------------- --spec foldl(fun(), term(), db_handle()) -> term(). -%% %% Description: Calls Fun(Elem, AccIn) on successive elements of the %% cache, starting with AccIn == Acc0. Fun/2 must return a new %% accumulator which is passed to the next call. The function returns @@ -91,8 +77,6 @@ foldl(Fun, Acc0, Cache) -> ets:foldl(Fun, Acc0, Cache). %%-------------------------------------------------------------------- --spec select_session(db_handle(), {host(), inet:port_number()} | inet:port_number()) -> [#session{}]. -%% %% Description: Selects a session that could be reused. Should be callable %% from any process. %%-------------------------------------------------------------------- |