Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 6bcc8a26fce5054c3bfe8f97bf4ac66eae5f2b97 Dylan Stamat committed Jun 12, 2008
Showing with 3,280 additions and 0 deletions.
  1. +4 −0 History.txt
  2. +2 −0 License.txt
  3. +43 −0 Manifest.txt
  4. +7 −0 PostInstall.txt
  5. +35 −0 README.txt
  6. +4 −0 Rakefile
  7. +13 −0 config/ehcache.yml
  8. +73 −0 config/hoe.rb
  9. +15 −0 config/requirements.rb
  10. +15 −0 ext/ehcache-1.4.1/LICENSE.txt
  11. +131 −0 ext/ehcache-1.4.1/RELEASE_NOTES.txt
  12. BIN ext/ehcache-1.4.1/ehcache-1.4.1-javadoc.zip
  13. BIN ext/ehcache-1.4.1/ehcache-1.4.1-remote-debugger.jar
  14. BIN ext/ehcache-1.4.1/ehcache-1.4.1-sources.jar
  15. BIN ext/ehcache-1.4.1/ehcache-1.4.1.jar
  16. +123 −0 ext/ehcache-1.4.1/ehcache.xsd
  17. BIN ext/ehcache-1.4.1/lib/backport-util-concurrent-3.0.jar
  18. BIN ext/ehcache-1.4.1/lib/commons-logging-1.0.4.jar
  19. BIN ext/ehcache-1.4.1/lib/jsr107cache-1.0.jar
  20. +15 −0 lib/ehcache.rb
  21. +42 −0 lib/ehcache/cache.rb
  22. +67 −0 lib/ehcache/cache_manager.rb
  23. +80 −0 lib/ehcache/config.rb
  24. +11 −0 lib/ehcache/element.rb
  25. +8 −0 lib/ehcache/java.rb
  26. +9 −0 lib/ehcache/version.rb
  27. BIN pkg/ehcache-0.0.1.gem
  28. +10 −0 script/console
  29. +14 −0 script/destroy
  30. +14 −0 script/generate
  31. +82 −0 script/txt2html
  32. +1,585 −0 setup.rb
  33. +56 −0 spec/cache_manager_spec.rb
  34. +31 −0 spec/cache_spec.rb
  35. +2 −0 spec/spec.opts
  36. +12 −0 spec/spec_helper.rb
  37. +34 −0 tasks/deployment.rake
  38. +7 −0 tasks/environment.rake
  39. +17 −0 tasks/website.rake
  40. +11 −0 test/test_ehcache.rb
  41. +11 −0 test/test_ehcachejr.rb
  42. +2 −0 test/test_helper.rb
  43. +141 −0 website/index.html
  44. +83 −0 website/index.txt
  45. +285 −0 website/javascripts/rounded_corners_lite.inc.js
  46. +138 −0 website/stylesheets/screen.css
  47. +48 −0 website/template.html.erb
@@ -0,0 +1,4 @@
+== 0.0.1 2008-06-05
+
+* 1 major enhancement:
+ * Initial release
@@ -0,0 +1,2 @@
+Copyright (c) 2008 Dylan Stamat
+...
@@ -0,0 +1,43 @@
+History.txt
+License.txt
+Manifest.txt
+PostInstall.txt
+README.txt
+Rakefile
+config/ehcache.yml
+config/hoe.rb
+config/requirements.rb
+ext/ehcache-1.4.1/LICENSE.txt
+ext/ehcache-1.4.1/RELEASE_NOTES.txt
+ext/ehcache-1.4.1/ehcache-1.4.1-javadoc.zip
+ext/ehcache-1.4.1/ehcache-1.4.1-remote-debugger.jar
+ext/ehcache-1.4.1/ehcache-1.4.1-sources.jar
+ext/ehcache-1.4.1/ehcache-1.4.1.jar
+ext/ehcache-1.4.1/ehcache.xsd
+ext/ehcache-1.4.1/lib/backport-util-concurrent-3.0.jar
+ext/ehcache-1.4.1/lib/commons-logging-1.0.4.jar
+ext/ehcache-1.4.1/lib/jsr107cache-1.0.jar
+lib/ehcache.rb
+lib/ehcache/cache.rb
+lib/ehcache/cache_manager.rb
+lib/ehcache/config.rb
+lib/ehcache/element.rb
+lib/ehcache/java.rb
+lib/ehcache/version.rb
+script/console
+script/destroy
+script/generate
+script/txt2html
+setup.rb
+spec/spec_helper.rb
+tasks/deployment.rake
+tasks/environment.rake
+tasks/website.rake
+test/test_ehcache.rb
+test/test_ehcachejr.rb
+test/test_helper.rb
+website/index.html
+website/index.txt
+website/javascripts/rounded_corners_lite.inc.js
+website/stylesheets/screen.css
+website/template.html.erb
@@ -0,0 +1,7 @@
+
+For more information on ehcache, see http://ehcache.rubyforge.org
+
+NOTE: Change this information in PostInstall.txt
+You can also delete it if you don't want it.
+
+
@@ -0,0 +1,35 @@
+= ehcache
+
+* FIX (url)
+
+== DESCRIPTION:
+
+Ehcache is a simplified JRuby interface to Java's Ehcache.
+Simplified, meaning no Singleton support, and a ton of other small
+things left out primarily because I didn't need them :P
+
+A complete inteface would be grand, and contribution is welcome !
+
+== FEATURES/PROBLEMS:
+
+No Singleton support, and... probably more.
+
+== SYNOPSIS:
+
+manager = CacheManager.new
+cache = manager.cache("cache")
+cache.put("key", "value")
+cache.get("key")
+
+manager.shutdown
+
+== REQUIREMENTS:
+
+* FIX (list of requirements)
+
+== INSTALL:
+
+sudo gem install ehcache
+
+== LICENSE:
+...
@@ -0,0 +1,4 @@
+require 'config/requirements'
+require 'config/hoe' # setup Hoe + all gem configuration
+
+Dir['tasks/**/*.rake'].each { |rake| load rake }
@@ -0,0 +1,13 @@
+# cache managers
+defaults:
+ store: disk
+ max_elements: 10000
+ time_to_live: 120
+ time_to_idle: 120
+ disk_overflow: true
+ clients:
+ - 127.0.0.1:40001
+
+sample_cache:
+ servers:
+ - 127.0.0.1:40000
@@ -0,0 +1,73 @@
+require 'ehcache/version'
+
+AUTHOR = 'Dylan Stamat' # can also be an array of Authors
+EMAIL = "dstamat@elctech.com"
+DESCRIPTION = "JRuby interface to Ehcache"
+GEM_NAME = 'ehcache' # what ppl will type to install your gem
+RUBYFORGE_PROJECT = 'ehcache' # The unix name for your project
+HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
+DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
+EXTRA_DEPENDENCIES = [
+# ['activesupport', '>= 1.3.1']
+] # An array of rubygem dependencies [name, version]
+
+@config_file = "~/.rubyforge/user-config.yml"
+@config = nil
+RUBYFORGE_USERNAME = "unknown"
+def rubyforge_username
+ unless @config
+ begin
+ @config = YAML.load(File.read(File.expand_path(@config_file)))
+ rescue
+ puts <<-EOS
+ERROR: No rubyforge config file found: #{@config_file}
+Run 'rubyforge setup' to prepare your env for access to Rubyforge
+ - See http://newgem.rubyforge.org/rubyforge.html for more details
+ EOS
+ exit
+ end
+ end
+ RUBYFORGE_USERNAME.replace @config["username"]
+end
+
+
+REV = nil
+# UNCOMMENT IF REQUIRED:
+# REV = YAML.load(`svn info`)['Revision']
+VERS = Ehcache::VERSION::STRING + (REV ? ".#{REV}" : "")
+RDOC_OPTS = ['--quiet', '--title', 'ehcache documentation',
+ "--opname", "index.html",
+ "--line-numbers",
+ "--main", "README",
+ "--inline-source"]
+
+class Hoe
+ def extra_deps
+ @extra_deps.reject! { |x| Array(x).first == 'hoe' }
+ @extra_deps
+ end
+end
+
+# Generate all the Rake tasks
+# Run 'rake -T' to see list of generated tasks (from gem root directory)
+$hoe = Hoe.new(GEM_NAME, VERS) do |p|
+ p.developer(AUTHOR, EMAIL)
+ p.description = DESCRIPTION
+ p.summary = DESCRIPTION
+ p.url = HOMEPATH
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
+ p.test_globs = ["test/**/test_*.rb"]
+ p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
+
+ # == Optional
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
+ #p.extra_deps = EXTRA_DEPENDENCIES
+
+ #p.spec_extras = {} # A hash of extra values to set in the gemspec.
+ end
+
+CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
+PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
+$hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
+$hoe.rsync_args = '-av --delete --ignore-errors'
+$hoe.spec.post_install_message = File.open(File.dirname(__FILE__) + "/../PostInstall.txt").read rescue ""
@@ -0,0 +1,15 @@
+require 'fileutils'
+include FileUtils
+
+require 'rubygems'
+%w[rake hoe newgem rubigen].each do |req_gem|
+ begin
+ require req_gem
+ rescue LoadError
+ puts "This Rakefile requires the '#{req_gem}' RubyGem."
+ puts "Installation: gem install #{req_gem} -y"
+ exit
+ end
+end
+
+$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
@@ -0,0 +1,15 @@
+/**
+ * Copyright 2003-2007 Luck Consulting Pty Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
@@ -0,0 +1,131 @@
+$Id: RELEASE_NOTES.txt,v 1.16 2006/03/01 01:52:03 gregluck Exp $
+
+
+Release Notes For ehcache version 1.4
+=====================================
+
+Introduction
+============
+Ehcache is a pure Java, in-process cache with the following features:
+
+ 1. Fast.
+ 2. Simple.
+ 3. Multiple eviction policies: LRU, LFU and FIFO.
+ 4. Caches can be in memory or on disk.
+ 5. Disk Stores can be persistent between VM restarts.
+ 6. Distributed caching using multicast and RMI, with a pluggable API.
+ 7. Cache and CacheManager listeners
+ 8. Supports multiple Caches per CacheManager, and multiple CacheManagers per application.
+ 9. Acts as a pluggable cache for Hibernate 3.1, 3 and 2.1.
+ 10. Small foot print. Both in terms of size and memory requirements.
+ 11. Minimal dependencies apart from J2SE.
+ 12. Fully documented. See the online Documentation and the online JavaDoc.
+ 13. Comprehensive Test Coverage. See the clover test report.
+ 14. Available under the Apache 1.1 license. EHCache's copyright and licensing has been reviewed and approved by the Apache Software Foundation, making EHCache suitable for use in Apache projects.
+ 15. Production tested. EHCache is used on a large and very busy eCommerce site.
+ 16. Web caching, pull-through caches and other common caching implementations are provided in the ehcache-constructs module.
+ 17. Full JMX monitoring implementation
+ 18. Complete implementation of the draft JCACHE (JSR107) specification.
+
+Java Requirements
+=================
+
+ Ehcache supports 1.4, 1.5 and 1.6 at runtime. Ehcache final releases are compiled with -target 1.4.
+ This produces Java class data, version 48.0.
+
+ Because of an {{{http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4267864}RMI bug}}, in JDKs before JDK1.5
+ ehcache is limited to one CacheManager operating in distributed mode per virtual machine.
+ (The bug limits the number of RMI registries to one per virtual machine). Because this is the expected deployment
+ configuration, however, ther should be no practical effect.
+
+ On JDK1.5 and higher it is possible to have multiple CacheManagers per VM each participating in the same or different clusters.
+ Indeed the replication tests do this with 5 CacheManagers on the same VM all run from JUnit.
+
+Dependencies
+============
+
+
+Mandatory Dependencies
+----------------------
+
+Commons Logging
+
+ Ehcache requires {{{http://jakarta.apache.org/commons/logging/}commons-logging}} commons-logging is a very common dependency, and is therefore not included in the distribution.
+
+ It is included in the tarball and the maven dependencies.
+
+
+Backport Concurrent
+
+ Backport Concurrent is a dependency for use of the JCache API. Rather than using the library which maven will pull down, users should consider
+ using a version which matches their JDK version. See {{http://dcl.mathcs.emory.edu/util/backport-util-concurrent}}.
+
+ The Java 4 version, which is compatible with Java 4 - 6 is included in the tarball and the maven dependencies.
+
+Optional Dependencies
+---------------------
+
+JMX
+
+ The management package of ehcache requires JMX. Version 1.3 or higher will work. This is optional and only required if you are using the
+ <<<ManagementService>>>.
+
+ Of course JDK1.5 has it built in.
+
+Commons collections
+
+ This is optional. Use it if you are using ehcache with Terracotta. They have a limitation which prevents them from using
+ the build in JDK one.
+
+ It can be turned on using by setting the system property <<<net.sf.ehcache.useLRUMap>>> to true.
+
+Maven POM snippet
+=================
+
+
+ Ehcache releases are placed in the central Maven repository.
+
+ The Maven snippet for ehcache 1.4.0, for example, is:
+
+
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>1.4.0</version>
+ </dependency>
+
+
+Installation
+============
+Place the ehcache.jar into your classpath. Ensure the required dependencies are in the classpath.
+
+Create an ehcache.xml configuration from the one supplied in the distribution and place it in your classpath.
+
+The ehcache-remote-debugger.jar is a tool to be used for distributed debugging. Do not install it in
+your project. See http://ehcache.sourceforge.net/documentation/logging.html for how to use it.
+
+
+Documentation
+=============
+See http://ehcache.sourceforge.net/documentation for full documentation.
+
+The JavaDoc is in the distribution and also online at http://ehcache.sourceforge.net/javadoc.
+
+Compatibility With Ehcache 1.1
+==============================
+1. Due to an internal reorganisation in the code base the DiskStore path will default to java.io.tmp when the ehcache-1.1
+constructor is used.
+
+2. APIs are the same. CacheException is now a runtime exception. Additionally, IOException is no longer thrown.
+This does not cause a runtime error but will cause a compile time error if clients are recompiled against ehcache. In
+this case change the code to not catch an IOException. Catching CacheException is optional.
+
+Known Issues
+============
+
+1. Due to a limitation in RMI, JDK1.5 or higher is required to run multiple distributed CacheManagers on the same machine.
+ Normally distributed caching is used between machines, so this should be a very rare issue.
+
+2. There are a number of known issues and workarounds for Tomcat. See the Using Ehcache with Tomcat chapter in the online documentation.
+
+3. See the FAQ online for more.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit 6bcc8a2

Please sign in to comment.