|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.olap4j.driver.xmla.cache.XmlaOlap4jNamedMemoryCache
public class XmlaOlap4jNamedMemoryCache
Implementation of the XMLA SOAP cache that places its cache entries in memory for later use. It is thread safe and at static class level.
It supports cache sharing through the Name property.
All parameters are optional.
XmlaOlap4jNamedMemoryCache.Property
Nested Class Summary | |
---|---|
static class |
XmlaOlap4jNamedMemoryCache.Mode
Defines the supported eviction modes. |
static class |
XmlaOlap4jNamedMemoryCache.Property
Properties which will be considered for configuration. |
Constructor Summary | |
---|---|
XmlaOlap4jNamedMemoryCache()
Default constructor which instantiates the concurrent hash map. |
Method Summary | |
---|---|
void |
flushCache()
Tells the cache to flush all cached entries. |
byte[] |
get(String id,
URL url,
byte[] request)
Fetches a SOAP response from the cache. |
void |
put(String id,
URL url,
byte[] request,
byte[] response)
Adds a SOAP response to the cache. |
String |
setParameters(Map<String,String> config,
Map<String,String> props)
Convenience method to receive custom properties. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlaOlap4jNamedMemoryCache()
Method Detail |
---|
public String setParameters(Map<String,String> config, Map<String,String> props)
XmlaOlap4jCache
The XMLA driver takes cache properties as
"Cache.[property name]=[value]
" in its JDBC url. All those
properties should be striped of their "Cache.
" prefix and
sent to this method as the props parameter.
Also, the complete map of the current connection should be passed as the config parameter.
setParameters
in interface XmlaOlap4jCache
config
- The complete configuration parameters which were used to
create the current connection.props
- The properties received from the JDBC url.
public byte[] get(String id, URL url, byte[] request) throws XmlaOlap4jInvalidStateException
XmlaOlap4jCache
get
in interface XmlaOlap4jCache
id
- The connection unique name which called this cache.url
- The URL where the SOAP message was sent.request
- The SOAP complete message.
XmlaOlap4jInvalidStateException
public void put(String id, URL url, byte[] request, byte[] response) throws XmlaOlap4jInvalidStateException
XmlaOlap4jCache
put
in interface XmlaOlap4jCache
id
- The connection unique name which called this cache.url
- The URL of the SOAP endpoint.request
- The full SOAP message from which we want to cache its
response.response
- The response to cache.
XmlaOlap4jInvalidStateException
public void flushCache()
XmlaOlap4jCache
flushCache
in interface XmlaOlap4jCache
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |