torquebox-cache 2.0.0.beta1-java → 2.0.0.beta2-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 +1 -1
 - data/lib/cache.rb +6 -1
 - data/lib/cache_listener.rb +1 -1
 - data/lib/datamapper/dm-infinispan-adapter.rb +17 -16
 - data/lib/datamapper/model.rb +17 -15
 - data/lib/datamapper/search.rb +16 -15
 - data/lib/dm-infinispan-adapter.rb +17 -0
 - data/lib/gem_hook.rb +1 -1
 - data/lib/torquebox-cache.jar +0 -0
 - data/lib/torquebox-cache.rb +2 -2
 - data/spec/dm-infinispan-adapter_spec.rb +2 -2
 - metadata +4 -4
 
    
        data/lib/cache.rb
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Copyright 2008- 
     | 
| 
      
 1 
     | 
    
         
            +
            # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
         
     | 
| 
       2 
2 
     | 
    
         
             
            # 
         
     | 
| 
       3 
3 
     | 
    
         
             
            # This is free software; you can redistribute it and/or modify it
         
     | 
| 
       4 
4 
     | 
    
         
             
            # under the terms of the GNU Lesser General Public License as
         
     | 
| 
         @@ -94,6 +94,7 @@ module TorqueBox 
     | 
|
| 
       94 
94 
     | 
    
         
             
                  end
         
     | 
| 
       95 
95 
     | 
    
         | 
| 
       96 
96 
     | 
    
         
             
                  def initialize(opts = {})
         
     | 
| 
      
 97 
     | 
    
         
            +
                    return nothing unless INFINISPAN_AVAILABLE
         
     | 
| 
       97 
98 
     | 
    
         
             
                    @options = opts
         
     | 
| 
       98 
99 
     | 
    
         
             
                    options[:transaction_mode] = :transactional unless options.has_key?( :transaction_mode )
         
     | 
| 
       99 
100 
     | 
    
         
             
                    options[:locking_mode] ||= :optimistic if (transactional? && !options.has_key?( :locking_mode ))
         
     | 
| 
         @@ -364,9 +365,13 @@ module TorqueBox 
     | 
|
| 
       364 
365 
     | 
    
         
             
                    if options[:index]
         
     | 
| 
       365 
366 
     | 
    
         
             
                      log( "Configuring #{name} local cache for local-only indexing" )
         
     | 
| 
       366 
367 
     | 
    
         
             
                      config.indexing.index_local_only(true)
         
     | 
| 
      
 368 
     | 
    
         
            +
                    else
         
     | 
| 
      
 369 
     | 
    
         
            +
                      log( "Configuring #{name} local cache with no indexing" )
         
     | 
| 
      
 370 
     | 
    
         
            +
                      config.indexing.disable
         
     | 
| 
       367 
371 
     | 
    
         
             
                    end
         
     | 
| 
       368 
372 
     | 
    
         | 
| 
       369 
373 
     | 
    
         
             
                    if ((local_manager = Cache.find_local_manager(name)) == nil)
         
     | 
| 
      
 374 
     | 
    
         
            +
                      log( "No local CacheManager exists for #{name}. Creating one." )
         
     | 
| 
       370 
375 
     | 
    
         
             
                      local_manager = org.infinispan.manager.DefaultCacheManager.new
         
     | 
| 
       371 
376 
     | 
    
         
             
                      local_manager.define_configuration( name, config.build )
         
     | 
| 
       372 
377 
     | 
    
         
             
                      Cache.local_managers << local_manager
         
     | 
    
        data/lib/cache_listener.rb
    CHANGED
    
    
| 
         @@ -1,18 +1,20 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #
         
     | 
| 
       2 
     | 
    
         
            -
            #  
     | 
| 
       3 
     | 
    
         
            -
            #
         
     | 
| 
       4 
     | 
    
         
            -
            #  
     | 
| 
       5 
     | 
    
         
            -
            #  
     | 
| 
       6 
     | 
    
         
            -
            #  
     | 
| 
       7 
     | 
    
         
            -
            #
         
     | 
| 
       8 
     | 
    
         
            -
            # 
     | 
| 
       9 
     | 
    
         
            -
            #
         
     | 
| 
       10 
     | 
    
         
            -
            #  
     | 
| 
       11 
     | 
    
         
            -
            #  
     | 
| 
       12 
     | 
    
         
            -
            #  
     | 
| 
       13 
     | 
    
         
            -
            #  
     | 
| 
       14 
     | 
    
         
            -
            #  
     | 
| 
       15 
     | 
    
         
            -
            #
         
     | 
| 
      
 1 
     | 
    
         
            +
            # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
         
     | 
| 
      
 2 
     | 
    
         
            +
            # 
         
     | 
| 
      
 3 
     | 
    
         
            +
            # This is free software; you can redistribute it and/or modify it
         
     | 
| 
      
 4 
     | 
    
         
            +
            # under the terms of the GNU Lesser General Public License as
         
     | 
| 
      
 5 
     | 
    
         
            +
            # published by the Free Software Foundation; either version 2.1 of
         
     | 
| 
      
 6 
     | 
    
         
            +
            # the License, or (at your option) any later version.
         
     | 
| 
      
 7 
     | 
    
         
            +
            # 
         
     | 
| 
      
 8 
     | 
    
         
            +
            # This software is distributed in the hope that it will be useful,
         
     | 
| 
      
 9 
     | 
    
         
            +
            # but WITHOUT ANY WARRANTY; without even the implied warranty of
         
     | 
| 
      
 10 
     | 
    
         
            +
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Lesser General Public License for more details.
         
     | 
| 
      
 12 
     | 
    
         
            +
            # 
         
     | 
| 
      
 13 
     | 
    
         
            +
            # You should have received a copy of the GNU Lesser General Public
         
     | 
| 
      
 14 
     | 
    
         
            +
            # License along with this software; if not, write to the Free
         
     | 
| 
      
 15 
     | 
    
         
            +
            # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
         
     | 
| 
      
 16 
     | 
    
         
            +
            # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
       16 
18 
     | 
    
         
             
            require "digest/sha1"
         
     | 
| 
       17 
19 
     | 
    
         
             
            require 'dm-core'
         
     | 
| 
       18 
20 
     | 
    
         
             
            require 'cache'
         
     | 
| 
         @@ -53,7 +55,6 @@ module DataMapper::Adapters 
     | 
|
| 
       53 
55 
     | 
    
         
             
                end
         
     | 
| 
       54 
56 
     | 
    
         | 
| 
       55 
57 
     | 
    
         
             
                def read( query )
         
     | 
| 
       56 
     | 
    
         
            -
                  records = []
         
     | 
| 
       57 
58 
     | 
    
         
             
                  query.filter_records(@search.search( query ))
         
     | 
| 
       58 
59 
     | 
    
         
             
                end
         
     | 
| 
       59 
60 
     | 
    
         | 
    
        data/lib/datamapper/model.rb
    CHANGED
    
    | 
         @@ -1,18 +1,20 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #
         
     | 
| 
       2 
     | 
    
         
            -
            #  
     | 
| 
       3 
     | 
    
         
            -
            #
         
     | 
| 
       4 
     | 
    
         
            -
            #  
     | 
| 
       5 
     | 
    
         
            -
            #  
     | 
| 
       6 
     | 
    
         
            -
            #  
     | 
| 
       7 
     | 
    
         
            -
            #
         
     | 
| 
       8 
     | 
    
         
            -
            # 
     | 
| 
       9 
     | 
    
         
            -
            #
         
     | 
| 
       10 
     | 
    
         
            -
            #  
     | 
| 
       11 
     | 
    
         
            -
            #  
     | 
| 
       12 
     | 
    
         
            -
            #  
     | 
| 
       13 
     | 
    
         
            -
            #  
     | 
| 
       14 
     | 
    
         
            -
            #  
     | 
| 
       15 
     | 
    
         
            -
            #
         
     | 
| 
      
 1 
     | 
    
         
            +
            # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
         
     | 
| 
      
 2 
     | 
    
         
            +
            # 
         
     | 
| 
      
 3 
     | 
    
         
            +
            # This is free software; you can redistribute it and/or modify it
         
     | 
| 
      
 4 
     | 
    
         
            +
            # under the terms of the GNU Lesser General Public License as
         
     | 
| 
      
 5 
     | 
    
         
            +
            # published by the Free Software Foundation; either version 2.1 of
         
     | 
| 
      
 6 
     | 
    
         
            +
            # the License, or (at your option) any later version.
         
     | 
| 
      
 7 
     | 
    
         
            +
            # 
         
     | 
| 
      
 8 
     | 
    
         
            +
            # This software is distributed in the hope that it will be useful,
         
     | 
| 
      
 9 
     | 
    
         
            +
            # but WITHOUT ANY WARRANTY; without even the implied warranty of
         
     | 
| 
      
 10 
     | 
    
         
            +
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Lesser General Public License for more details.
         
     | 
| 
      
 12 
     | 
    
         
            +
            # 
         
     | 
| 
      
 13 
     | 
    
         
            +
            # You should have received a copy of the GNU Lesser General Public
         
     | 
| 
      
 14 
     | 
    
         
            +
            # License along with this software; if not, write to the Free
         
     | 
| 
      
 15 
     | 
    
         
            +
            # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
         
     | 
| 
      
 16 
     | 
    
         
            +
            # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
       16 
18 
     | 
    
         
             
            require 'dm-serializer'
         
     | 
| 
       17 
19 
     | 
    
         
             
            require 'jruby/core_ext'
         
     | 
| 
       18 
20 
     | 
    
         
             
            require 'json'
         
     | 
    
        data/lib/datamapper/search.rb
    CHANGED
    
    | 
         @@ -1,18 +1,19 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #
         
     | 
| 
       2 
     | 
    
         
            -
            #  
     | 
| 
       3 
     | 
    
         
            -
            #
         
     | 
| 
       4 
     | 
    
         
            -
            #  
     | 
| 
       5 
     | 
    
         
            -
            #  
     | 
| 
       6 
     | 
    
         
            -
            #  
     | 
| 
       7 
     | 
    
         
            -
            #
         
     | 
| 
       8 
     | 
    
         
            -
            # 
     | 
| 
       9 
     | 
    
         
            -
            #
         
     | 
| 
       10 
     | 
    
         
            -
            #  
     | 
| 
       11 
     | 
    
         
            -
            #  
     | 
| 
       12 
     | 
    
         
            -
            #  
     | 
| 
       13 
     | 
    
         
            -
            #  
     | 
| 
       14 
     | 
    
         
            -
            #  
     | 
| 
       15 
     | 
    
         
            -
            #
         
     | 
| 
      
 1 
     | 
    
         
            +
            # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
         
     | 
| 
      
 2 
     | 
    
         
            +
            # 
         
     | 
| 
      
 3 
     | 
    
         
            +
            # This is free software; you can redistribute it and/or modify it
         
     | 
| 
      
 4 
     | 
    
         
            +
            # under the terms of the GNU Lesser General Public License as
         
     | 
| 
      
 5 
     | 
    
         
            +
            # published by the Free Software Foundation; either version 2.1 of
         
     | 
| 
      
 6 
     | 
    
         
            +
            # the License, or (at your option) any later version.
         
     | 
| 
      
 7 
     | 
    
         
            +
            # 
         
     | 
| 
      
 8 
     | 
    
         
            +
            # This software is distributed in the hope that it will be useful,
         
     | 
| 
      
 9 
     | 
    
         
            +
            # but WITHOUT ANY WARRANTY; without even the implied warranty of
         
     | 
| 
      
 10 
     | 
    
         
            +
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Lesser General Public License for more details.
         
     | 
| 
      
 12 
     | 
    
         
            +
            # 
         
     | 
| 
      
 13 
     | 
    
         
            +
            # You should have received a copy of the GNU Lesser General Public
         
     | 
| 
      
 14 
     | 
    
         
            +
            # License along with this software; if not, write to the Free
         
     | 
| 
      
 15 
     | 
    
         
            +
            # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
         
     | 
| 
      
 16 
     | 
    
         
            +
            # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
         
     | 
| 
       16 
17 
     | 
    
         | 
| 
       17 
18 
     | 
    
         
             
            module Infinispan
         
     | 
| 
       18 
19 
     | 
    
         | 
| 
         @@ -1 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Copyright 2008-2012 Red Hat, Inc, and individual contributors.
         
     | 
| 
      
 2 
     | 
    
         
            +
            # 
         
     | 
| 
      
 3 
     | 
    
         
            +
            # This is free software; you can redistribute it and/or modify it
         
     | 
| 
      
 4 
     | 
    
         
            +
            # under the terms of the GNU Lesser General Public License as
         
     | 
| 
      
 5 
     | 
    
         
            +
            # published by the Free Software Foundation; either version 2.1 of
         
     | 
| 
      
 6 
     | 
    
         
            +
            # the License, or (at your option) any later version.
         
     | 
| 
      
 7 
     | 
    
         
            +
            # 
         
     | 
| 
      
 8 
     | 
    
         
            +
            # This software is distributed in the hope that it will be useful,
         
     | 
| 
      
 9 
     | 
    
         
            +
            # but WITHOUT ANY WARRANTY; without even the implied warranty of
         
     | 
| 
      
 10 
     | 
    
         
            +
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Lesser General Public License for more details.
         
     | 
| 
      
 12 
     | 
    
         
            +
            # 
         
     | 
| 
      
 13 
     | 
    
         
            +
            # You should have received a copy of the GNU Lesser General Public
         
     | 
| 
      
 14 
     | 
    
         
            +
            # License along with this software; if not, write to the Free
         
     | 
| 
      
 15 
     | 
    
         
            +
            # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
         
     | 
| 
      
 16 
     | 
    
         
            +
            # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
       1 
18 
     | 
    
         
             
            require 'datamapper/dm-infinispan-adapter'
         
     | 
    
        data/lib/gem_hook.rb
    CHANGED
    
    
    
        data/lib/torquebox-cache.jar
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/torquebox-cache.rb
    CHANGED
    
    
| 
         @@ -339,8 +339,8 @@ describe DataMapper::Adapters::InfinispanAdapter do 
     | 
|
| 
       339 
339 
     | 
    
         
             
                end
         
     | 
| 
       340 
340 
     | 
    
         | 
| 
       341 
341 
     | 
    
         
             
                after :all do
         
     | 
| 
       342 
     | 
    
         
            -
                   
     | 
| 
       343 
     | 
    
         
            -
                   
     | 
| 
      
 342 
     | 
    
         
            +
                  FileUtils.rm_rf( @configured_dir )
         
     | 
| 
      
 343 
     | 
    
         
            +
                  FileUtils.rm_rf( @default_dir )
         
     | 
| 
       344 
344 
     | 
    
         
             
                  FileUtils.rm_rf( @snuffy )
         
     | 
| 
       345 
345 
     | 
    
         
             
                end
         
     | 
| 
       346 
346 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            name: torquebox-cache
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
4 
     | 
    
         
             
              prerelease: 6
         
     | 
| 
       5 
     | 
    
         
            -
              version: 2.0.0. 
     | 
| 
      
 5 
     | 
    
         
            +
              version: 2.0.0.beta2
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: java
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors: 
         
     | 
| 
       8 
8 
     | 
    
         
             
              - The TorqueBox Team
         
     | 
| 
         @@ -10,7 +10,7 @@ autorequire: 
     | 
|
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
            date:  
     | 
| 
      
 13 
     | 
    
         
            +
            date: 2012-01-05 00:00:00 Z
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       15 
15 
     | 
    
         
             
              - !ruby/object:Gem::Dependency 
         
     | 
| 
       16 
16 
     | 
    
         
             
                name: activesupport
         
     | 
| 
         @@ -42,7 +42,7 @@ dependencies: 
     | 
|
| 
       42 
42 
     | 
    
         
             
                  requirements: 
         
     | 
| 
       43 
43 
     | 
    
         
             
                    - - "="
         
     | 
| 
       44 
44 
     | 
    
         
             
                      - !ruby/object:Gem::Version 
         
     | 
| 
       45 
     | 
    
         
            -
                        version: 2.0.0. 
     | 
| 
      
 45 
     | 
    
         
            +
                        version: 2.0.0.beta2
         
     | 
| 
       46 
46 
     | 
    
         
             
                type: :runtime
         
     | 
| 
       47 
47 
     | 
    
         
             
                version_requirements: *id003
         
     | 
| 
       48 
48 
     | 
    
         
             
              - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -53,7 +53,7 @@ dependencies: 
     | 
|
| 
       53 
53 
     | 
    
         
             
                  requirements: 
         
     | 
| 
       54 
54 
     | 
    
         
             
                    - - "="
         
     | 
| 
       55 
55 
     | 
    
         
             
                      - !ruby/object:Gem::Version 
         
     | 
| 
       56 
     | 
    
         
            -
                        version: 2.0.0. 
     | 
| 
      
 56 
     | 
    
         
            +
                        version: 2.0.0.beta2
         
     | 
| 
       57 
57 
     | 
    
         
             
                type: :runtime
         
     | 
| 
       58 
58 
     | 
    
         
             
                version_requirements: *id004
         
     | 
| 
       59 
59 
     | 
    
         
             
              - !ruby/object:Gem::Dependency 
         
     |