/[de-setf-amqp]/parameters.lisp
ViewVC logotype

Contents of /parameters.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (hide annotations)
Tue Feb 23 09:05:39 2010 UTC (4 years, 2 months ago) by janderson
File size: 5231 byte(s)
Merge commit 'remotes/github/master' into remotes/git-svn
1 janderson 3 ;;; -*- Package: de.setf.amqp.implementation; -*-
2    
3     (in-package :de.setf.amqp.implementation)
4    
5     (document :file
6     (description "This file defines global parameters for the 'de.setf.amqp' library.")
7     (copyright
8     "Copyright 2010 [james anderson](mailto:james.anderson@setf.de) All Rights Reserved"
9     "'de.setf.amqp' is free software: you can redistribute it and/or modify it under the terms of version 3
10     of the GNU Affero General Public License as published by the Free Software Foundation.
11    
12     'setf.amqp' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13     implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14     See the Affero General Public License for more details.
15    
16     A copy of the GNU Affero General Public License should be included with 'de.setf.amqp' as `AMQP:agpl.txt`.
17     If not, see the GNU [site](http://www.gnu.org/licenses/)."))
18    
19    
20     ;;;
21     ;;; stream support
22    
23     (defvar amqp:*standard-port* 5672)
24    
25     (defvar *frame-size* 4096
26     "The wire-level frame size. buffer sizes are net frame header and posible trailer.
27     NB. this must exceed method argument and class header property lengths, as those cannot be
28     split betweeen frames. an unelaborated basic.publish content header is alredy over 140.")
29    
30     (defvar amqp:*frame-size-maximum* (* 512 1024))
31    
32     (defvar amqp:*default-version* :amqp-1-1-0-9-1)
33    
34     (defvar amqp.u:*version-headers* ()
35     "An a-list which maps version inticator keywords to protocol version header buffers.
36     The initial value is nil. Each loaded version sets its own header.")
37    
38     (defvar amqp.u:*version*
39     (load-time-value (format nil "de.setf.amqp-~a" (date:|yyyyMMddTHHmmssZZ| (get-universal-time)))))
40    
41     (defvar amqp:*timestamp-epoch* (date:|yyyyMMddTHHmmssZZ| "19700101T00000000"))
42    
43     (defconstant +string-element-type+ 'character)
44    
45     (defvar *connection* nil
46     "Binds the current connection for specializing protocol operators.
47     The global value, nil, reduces an effective operation to the default
48     method, which is specialized on the respective class to which the
49     command applies.")
50    
51     (defvar *channel* nil
52     "Binds the current channel, whan a channel-relative operation is in-progress.
53     The global value, nil, appies outside of the dynamic extent of such
54     operators.")
55    
56     (defvar *connection-timeout* 10
57     "Value in seconds to pass as time out duration for connection
58     socket operations.")
59    
60     (defparameter *default-locale* "en_US")
61    
62     (defparameter *default-mechanism* "PLAIN")
63    
64     (defparameter *max-channels* 256
65     "The upper bounds on the channel count per connection.")
66    
67     (defparameter *connection-classes* ()
68     "Set by amqp:initialize to a list of defined amqp:connection specializations,
69     sorted in descending version order.")
70    
71    
72     (defparameter *decimal-scale-factor* (expt 10 5))
73     (defparameter *decimal-scale* 5)
74    
75    
76     (def-mime-type-key :sexp :if-does-not-exist :create)
77     (def-mime-type (:application :sexp))
78    
79     ;;;
80     ;;; constants and parameters used for codec operators
81     ;;;
82     ;;; floating point boundary constants
83     ;;; define them where an implementation has not prepared them
84     ;;;
85     ;;; extended from corkill's openmcl addition
86    
87     #+mcl
88     (unless (boundp 'double-float-positive-infinity)
89     (eval-when (:compile-toplevel :load-toplevel :execute)
90     (defconstant double-float-positive-infinity
91     (unwind-protect
92     (progn
93     (ccl::set-fpu-mode :division-by-zero nil)
94     (funcall '/ 0d0))
95     (ccl::set-fpu-mode :division-by-zero t)))
96    
97     (defconstant double-float-negative-infinity
98     (unwind-protect
99     (progn
100     (ccl::set-fpu-mode :division-by-zero nil)
101     (funcall '/ -0d0))
102     (ccl::set-fpu-mode :division-by-zero t)))))
103    
104     #+(or mcl (and clozure (not ccl-1.4)))
105     (unless (boundp 'double-float-nan)
106     (defconstant double-float-nan
107     (unwind-protect
108     (locally (declare (special double-float-positive-infinity double-float-negative-infinity))
109     (ccl::set-fpu-mode :invalid nil)
110     (funcall '+ double-float-positive-infinity double-float-negative-infinity))
111     (ccl::set-fpu-mode :invalid t))))
112    
113     #+(or mcl clozure)
114     (unless (boundp 'single-float-positive-infinity)
115     (eval-when (:compile-toplevel :load-toplevel :execute)
116     (defconstant single-float-positive-infinity
117     (unwind-protect
118     (progn
119     (ccl::set-fpu-mode :division-by-zero nil)
120     (funcall '/ 0s0))
121     (ccl::set-fpu-mode :division-by-zero t)))
122    
123     (defconstant single-float-negative-infinity
124     (unwind-protect
125     (progn
126     (ccl::set-fpu-mode :division-by-zero nil)
127     (funcall '/ -0s0))
128     (ccl::set-fpu-mode :division-by-zero t)))))
129    
130     #+(or mcl clozure)
131     (unless (boundp 'single-float-nan)
132     (defconstant single-float-nan
133     (unwind-protect
134     (locally (declare (special single-float-positive-infinity single-float-negative-infinity))
135     (ccl::set-fpu-mode :invalid nil)
136     (funcall '+ single-float-positive-infinity single-float-negative-infinity))
137     (ccl::set-fpu-mode :invalid t))))
138    
139     #+sbcl ;; does this work?
140     (unless (boundp 'single-float-nam)
141     (defconstant single-float-nan
142     (+ single-float-positive-infinity single-float-negative-infinity))
143     (defconstant double-float-nan
144     (+ double-float-positive-infinity double-float-negative-infinity)))

  ViewVC Help
Powered by ViewVC 1.1.5