torquebox-cache 2.1.2-java → 2.2.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/active_support/cache/torque_box_store.rb +2 -0
- data/lib/cache.rb +14 -14
- data/lib/{polyglot-cache-1.7.2.jar → polyglot-cache-1.10.0.jar} +0 -0
- data/lib/{polyglot-core-1.7.2.jar → polyglot-core-1.10.0.jar} +0 -0
- data/lib/torquebox-cache.jar +0 -0
- data/lib/torquebox-cache.rb +4 -4
- data/spec/torque_box_store_spec.rb +1 -1
- metadata +149 -123
data/lib/cache.rb
CHANGED
@@ -23,6 +23,7 @@ require 'sequence'
|
|
23
23
|
module TorqueBox
|
24
24
|
module Infinispan
|
25
25
|
|
26
|
+
# @api private
|
26
27
|
class ContainerTransactionManagerLookup
|
27
28
|
include TorqueBox::Injectors
|
28
29
|
begin
|
@@ -51,7 +52,8 @@ module TorqueBox
|
|
51
52
|
|
52
53
|
SECONDS = java.util.concurrent.TimeUnit::SECONDS
|
53
54
|
begin
|
54
|
-
java_import org.infinispan.
|
55
|
+
java_import org.infinispan.configuration.cache::CacheMode
|
56
|
+
java_import org.infinispan.configuration.cache::ConfigurationBuilder
|
55
57
|
java_import org.infinispan.transaction::TransactionMode
|
56
58
|
java_import org.infinispan.transaction::LockingMode
|
57
59
|
java_import org.projectodd.polyglot.cache.as::CacheService
|
@@ -275,31 +277,29 @@ module TorqueBox
|
|
275
277
|
|
276
278
|
def reconfigure(mode=clustering_mode)
|
277
279
|
existing_cache = manager.get_cache(name)
|
278
|
-
base_config = existing_cache.
|
279
|
-
unless base_config.cache_mode == mode
|
280
|
+
base_config = existing_cache.cache_configuration
|
281
|
+
unless base_config.clustering.cache_mode == mode
|
280
282
|
log( "Reconfiguring Infinispan cache #{name} from #{base_config.cache_mode} to #{mode}" )
|
281
|
-
existing_cache
|
283
|
+
existing_cache.stop
|
282
284
|
configure(mode)
|
283
|
-
existing_cache
|
285
|
+
existing_cache.start
|
284
286
|
end
|
285
|
-
return existing_cache
|
287
|
+
return existing_cache
|
286
288
|
end
|
287
289
|
|
288
290
|
def configure(mode=clustering_mode)
|
289
291
|
log( "Configuring Infinispan cache #{name} as #{mode}" )
|
290
|
-
|
291
|
-
|
292
|
-
config = base_config.fluent
|
292
|
+
config = ConfigurationBuilder.new.read( manager.default_cache_configuration )
|
293
|
+
config.clustering.cacheMode( mode )
|
293
294
|
config.transaction.transactionMode( transaction_mode )
|
294
295
|
if transactional?
|
295
|
-
config.transaction.transactionManagerLookup( transaction_manager_lookup )
|
296
|
+
config.transaction.transactionManagerLookup( transaction_manager_lookup )
|
296
297
|
config.transaction.lockingMode( locking_mode )
|
297
298
|
end
|
298
299
|
if persisted?
|
299
|
-
store =
|
300
|
-
store.
|
301
|
-
store.location(options[:persist]) if File.exist?( options[:persist].to_s )
|
302
|
-
config.loaders.add_cache_loader( store )
|
300
|
+
store = config.loaders.add_file_cache_store
|
301
|
+
store.purgeOnStartup( false )
|
302
|
+
store.location(options[:persist]) if File.exist?( options[:persist].to_s )
|
303
303
|
end
|
304
304
|
manager.define_configuration(name, config.build )
|
305
305
|
manager.get_cache(name)
|
Binary file
|
Binary file
|
data/lib/torquebox-cache.jar
CHANGED
Binary file
|
data/lib/torquebox-cache.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module TorqueboxCache
|
2
|
-
VERSION = '2.
|
3
|
-
MAVEN_VERSION = '2.
|
2
|
+
VERSION = '2.2.0'
|
3
|
+
MAVEN_VERSION = '2.2.0'
|
4
4
|
end
|
5
5
|
begin
|
6
6
|
require 'java'
|
7
7
|
require File.dirname(__FILE__) + '/torquebox-cache.jar'
|
8
|
-
require File.dirname(__FILE__) + '/polyglot-cache-1.
|
9
|
-
require File.dirname(__FILE__) + '/polyglot-core-1.
|
8
|
+
require File.dirname(__FILE__) + '/polyglot-cache-1.10.0.jar'
|
9
|
+
require File.dirname(__FILE__) + '/polyglot-core-1.10.0.jar'
|
10
10
|
rescue LoadError
|
11
11
|
puts 'JAR-based gems require JRuby to load. Please visit www.jruby.org.'
|
12
12
|
raise
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'active_support/cache/torque_box_store'
|
2
2
|
require 'logger'
|
3
3
|
|
4
|
-
java_import org.infinispan.
|
4
|
+
java_import org.infinispan.configuration.cache::CacheMode
|
5
5
|
include ActiveSupport::Cache
|
6
6
|
|
7
7
|
TORQUEBOX_APP_NAME = 'active-support-unit-test'
|
metadata
CHANGED
@@ -1,138 +1,164 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: torquebox-cache
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 2.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 2.2.0
|
6
6
|
platform: java
|
7
|
-
authors:
|
8
|
-
|
9
|
-
autorequire:
|
7
|
+
authors:
|
8
|
+
- The TorqueBox Team
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
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
|
-
|
12
|
+
date: 2012-12-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 3.0.10
|
21
|
+
none: false
|
22
|
+
requirement: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.10
|
27
|
+
none: false
|
28
|
+
prerelease: false
|
29
|
+
type: :development
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: i18n
|
32
|
+
version_requirements: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - '='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.5.0
|
37
|
+
none: false
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.5.0
|
43
|
+
none: false
|
44
|
+
prerelease: false
|
45
|
+
type: :development
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: torquebox-core
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - '='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 2.2.0
|
53
|
+
none: false
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - '='
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 2.2.0
|
59
|
+
none: false
|
60
|
+
prerelease: false
|
61
|
+
type: :runtime
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: torquebox-transactions
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.2.0
|
69
|
+
none: false
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 2.2.0
|
75
|
+
none: false
|
76
|
+
prerelease: false
|
77
|
+
type: :runtime
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: json
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - '='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 1.4.6
|
85
|
+
none: false
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 1.4.6
|
91
|
+
none: false
|
92
|
+
prerelease: false
|
93
|
+
type: :development
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rspec
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - '='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 2.7.0
|
101
|
+
none: false
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - '='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 2.7.0
|
107
|
+
none: false
|
108
|
+
prerelease: false
|
109
|
+
type: :development
|
110
|
+
description: ''
|
111
|
+
email:
|
112
|
+
- torquebox-dev@torquebox.org
|
84
113
|
executables: []
|
85
|
-
|
86
114
|
extensions: []
|
87
|
-
|
88
115
|
extra_rdoc_files: []
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
- spec/spec.opts
|
116
|
+
files:
|
117
|
+
- licenses/lgpl-2.1.txt
|
118
|
+
- lib/torquebox-cache.jar
|
119
|
+
- lib/torquebox-cache.rb
|
120
|
+
- lib/polyglot-cache-1.10.0.jar
|
121
|
+
- lib/polyglot-core-1.10.0.jar
|
122
|
+
- lib/gem_hook.rb
|
123
|
+
- lib/cache.rb
|
124
|
+
- lib/sequence.rb
|
125
|
+
- lib/cache_listener.rb
|
126
|
+
- lib/active_support/cache/torque_box_store.rb
|
127
|
+
- spec/cache_spec.rb
|
128
|
+
- spec/gem_hook_spec.rb
|
129
|
+
- spec/spec.opts
|
130
|
+
- spec/cache_listener_spec.rb
|
131
|
+
- spec/torque_box_store_spec.rb
|
132
|
+
- spec/spec_helper.rb
|
107
133
|
homepage: http://torquebox.org/
|
108
|
-
licenses:
|
109
|
-
|
110
|
-
post_install_message:
|
134
|
+
licenses:
|
135
|
+
- lgpl
|
136
|
+
post_install_message:
|
111
137
|
rdoc_options: []
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
138
|
+
require_paths:
|
139
|
+
- lib
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ! '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: !binary |-
|
145
|
+
MA==
|
116
146
|
none: false
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ! '>='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: !binary |-
|
152
|
+
MA==
|
122
153
|
none: false
|
123
|
-
requirements:
|
124
|
-
- - ">="
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: "0"
|
127
154
|
requirements: []
|
128
|
-
|
129
|
-
rubyforge_project:
|
155
|
+
rubyforge_project:
|
130
156
|
rubygems_version: 1.8.24
|
131
|
-
signing_key:
|
157
|
+
signing_key:
|
132
158
|
specification_version: 3
|
133
159
|
summary: TorqueBox Cache Gem
|
134
|
-
test_files:
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
160
|
+
test_files:
|
161
|
+
- spec/cache_spec.rb
|
162
|
+
- spec/gem_hook_spec.rb
|
163
|
+
- spec/cache_listener_spec.rb
|
164
|
+
- spec/torque_box_store_spec.rb
|