module ODBA
ODBA::CacheEntry
– odba – 09.01.2012 – mhatakeyama@ywesee.com ODBA::CacheEntry
– odba – 29.04.2004 – hwyss@ywesee.com mwalder@ywesee.com
ODBA
– odba – 26.01.2007 – hwyss@ywesee.com
Public Class Methods
cache()
click to toggle source
reader for the Cache
server. Defaults to ODBA::Cache.instance
# File lib/odba/odba.rb, line 6 def ODBA.cache @cache ||= ODBA::Cache.instance end
cache=(cache_server)
click to toggle source
writer for the Cache
server. You will probably never need this.
# File lib/odba/odba.rb, line 10 def ODBA.cache=(cache_server) @cache = cache_server end
marshaller()
click to toggle source
reader for the Marshaller. Defaults to ODBA
.Marshal
# File lib/odba/odba.rb, line 14 def ODBA.marshaller @marshaller ||= ODBA::Marshal end
marshaller=(marshaller)
click to toggle source
writer for the Marshaller. Example: override the default Marshaller to serialize your objects in a custom format (yaml, xml, …).
# File lib/odba/odba.rb, line 19 def ODBA.marshaller=(marshaller) @marshaller = marshaller end
peer(peer)
click to toggle source
peer two instances of ODBA::Cache
# File lib/odba/odba.rb, line 23 def ODBA.peer peer peer.register_peer ODBA.cache ODBA.cache.register_peer peer end
storage()
click to toggle source
reader for the Storage
Server. Defaults to ODBA::Storage.instance
# File lib/odba/odba.rb, line 28 def ODBA.storage @storage ||= ODBA::Storage.instance end
storage=(storage)
click to toggle source
transaction(&block)
click to toggle source
Convenience method. Delegates the transaction-call to the Cache
server.
# File lib/odba/odba.rb, line 42 def ODBA.transaction(&block) ODBA.cache.transaction(&block) end
unpeer(peer)
click to toggle source
unpeer two instances of ODBA::Cache
# File lib/odba/odba.rb, line 37 def ODBA.unpeer peer peer.unregister_peer ODBA.cache ODBA.cache.unregister_peer peer end