summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Log/LogStore.h
blob: 20e788e1769f033824382b0fdfcff04a92b58228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// -*- C++ -*-

//=============================================================================
/**
 *  @file   LogStore.h
 *
 *  $Id$
 *
 *  @author Matthew Braun <mjb2@cs.wustl.edu>
 *  @author Pradeep Gore <pradeep@cs.wustl.edu>
 *  @author David A. Hanvey <d.hanvey@qub.ac.uk>
 */
//=============================================================================

#ifndef TAO_TLS_LOGSTORE_H
#define TAO_TLS_LOGSTORE_H

#include /**/ "ace/pre.h"
#include /**/ "ace/config-all.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "orbsvcs/DsLogAdminC.h"
#include "log_serv_export.h"

class TAO_LogRecordStore;

class TAO_Log_Serv_Export TAO_LogStore
{
public:
  // Destructor
  virtual ~TAO_LogStore() {}

  /// Lists all logs created by the log factory.
  virtual DsLogAdmin::LogList *
    list_logs (ACE_ENV_SINGLE_ARG_DECL)
    ACE_THROW_SPEC ((
                     CORBA::SystemException
                     ))					= 0;

  /// Lists all log ids.
  virtual DsLogAdmin::LogIdList *
    list_logs_by_id (ACE_ENV_SINGLE_ARG_DECL)
    ACE_THROW_SPEC ((
                     CORBA::SystemException
                     ))					= 0;

  /// Returns a reference to the log with the supplied id.
  virtual DsLogAdmin::Log_ptr
    find_log (DsLogAdmin::LogId id
              ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((
                     CORBA::SystemException
                     ))					= 0;

  /// Returns true if log exists, otherwise false
  virtual bool 
    exists (DsLogAdmin::LogId id
	    ACE_ENV_ARG_DECL)				= 0;

  /// Remove the given entry from the hash table.
  virtual int 
    remove (DsLogAdmin::LogId id
	    ACE_ENV_ARG_DECL)				= 0;

  /// @brief Create log
  virtual void
    create (DsLogAdmin::LogFullActionType full_action,
	    CORBA::ULongLong max_size,
	    const DsLogAdmin::CapacityAlarmThresholdList* thresholds,
	    DsLogAdmin::LogId_out id_out
	    ACE_ENV_ARG_DECL)				= 0;

  /// @brief Create log
  virtual void 
    create_with_id (DsLogAdmin::LogId id,
		    DsLogAdmin::LogFullActionType full_action,
		    CORBA::ULongLong max_size,
		    const DsLogAdmin::CapacityAlarmThresholdList* thresholds
		    ACE_ENV_ARG_DECL)			= 0;

  /// @brief Get log record store 
  ///
  /// Get/Create a log record store for log channel @a id.
  ///
  /// @param id log id
  ///
  virtual TAO_LogRecordStore*
    get_log_record_store (DsLogAdmin::LogId id
		          ACE_ENV_ARG_DECL)		= 0;

protected:
  // Constructor 
  TAO_LogStore() {}


private:
};

#include /**/ "ace/post.h"

#endif /* TAO_TLS_LOGSTORE_H */