public interface XmlaOlap4jCache
The XMLA driver will call the cache before each SOAP request to see if it wasn't sent previously and if a SOAP response doesn't already exist in it.
Any implementations have to declare a constructor which takes a String as a parameter. This string value is the unique name of the connection which triggered the request.
Modifier and Type | Method and Description |
---|---|
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.
|
byte[] get(String id, URL url, byte[] request) throws OlapException
id
- The connection unique name which called this cache.url
- The URL where the SOAP message was sent.request
- The SOAP complete message.OlapException
- when operations to the cache are
performed but it hasn't been initialized. Make sure you
call the setParameters(Map, Map) method.void put(String id, URL url, byte[] request, byte[] response) throws OlapException
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.OlapException
- when operations to the cache are
performed but it hasn't been initialized. Make sure you
call the setParameters(Map, Map) method.void flushCache()
String setParameters(Map<String,String> config, Map<String,String> props)
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.
config
- The complete configuration parameters which were used to
create the current connection.props
- The properties received from the JDBC url.