addInterceptor(CommandInterceptor i,
int position)
Adds a custom interceptor to the interceptor chain, at specified position, where the first interceptor in the chain
is at position 0 and the last one at getInterceptorChain().size() - 1.

getMarshaller()
Retrieves an instance of a Marshaller, which is capable of
converting Java objects to bytestreams and back in an efficient manner, which is
also interoperable with bytestreams produced/consumed by other versions of JBoss
Cache.

getCurrentTransaction

Returns the transaction associated with the current thread.
If a local transaction exists, but doesn't yet have a mapping to a
GlobalTransaction, a new GlobalTransaction will be created and mapped to
the local transaction. Note that if a local transaction exists, but is
not ACTIVE or PREPARING, null is returned.

getNumberOfLocksHeld

exists

A convenience method that takes a String representation of an Fqn. Otherwise identical to CacheSPI.exists(Fqn).
Note that this call works
directly on the cache data structure and will not pass through the interceptor chain. Hence node locking, cache
loading or activation does not take place, and so the results of this call should not be treated as definitive.

exists

Helper method that does a peek and ensures that the result of the peek is not null. Note that this call works
directly on the cache data structure and will not pass through the interceptor chain. Hence node locking, cache
loading or activation does not take place, and so the results of this call should not be treated as definitive.

getMarshaller

Retrieves an instance of a Marshaller, which is capable of
converting Java objects to bytestreams and back in an efficient manner, which is
also interoperable with bytestreams produced/consumed by other versions of JBoss
Cache.

The use of this marshaller is the recommended way of creating efficient,
compatible, byte streams from objects.

From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
Inject annotation.

gravitateData

Used with buddy replication's data gravitation interceptor. If marshalling is necessary, ensure that the cache is
configured to use Configuration.useRegionBasedMarshalling and the Region
pertaining to the Fqn passed in is activated, and has an appropriate ClassLoader.

peek

Returns a node without accessing the interceptor chain, optionally returning nodes that are marked as invalid (Node.isValid() == false).
Note that this call works
directly on the cache data structure and will not pass through the interceptor chain. Hence node locking, cache
loading or activation does not take place, and so the results of this call should not be treated as definitive. Concurrent node
removal, passivation, etc. may affect the results of this call.

peek

Returns a node without accessing the interceptor chain. Does not return any nodes marked as invalid. Note that this call works
directly on the cache data structure and will not pass through the interceptor chain. Hence node locking, cache
loading or activation does not take place, and so the results of this call should not be treated as definitive. Concurrent node
removal, passivation, etc. may affect the results of this call.

putForExternalRead

Under special operating behavior, associates the value with the specified key for a node identified by the Fqn passed in.

Only goes through if the node specified does not exist; no-op otherwise.

Force asynchronous mode for replication to prevent any blocking.

invalidation does not take place.

0ms lock timeout to prevent any blocking here either. If the lock is not acquired, this method is a no-op, and swallows the timeout exception.

Ongoing transactions are suspended before this call, so failures here will not affect any ongoing transactions.

Errors and exceptions are 'silent' - logged at a much lower level than normal, and this method does not throw exceptions

This method is for caching data that has an external representation in storage, where, concurrent modification and
transactions are not a consideration, and failure to put the data in the cache should be treated as a 'suboptimal outcome'
rather than a 'failing outcome'.

An example of when this method is useful is when data is read from, for example, a legacy datastore, and is cached before
returning the data to the caller. Subsequent calls would prefer to get the data from the cache and if the data doesn't exist
in the cache, fetch again from the legacy datastore.

previous value associated with specified key, or null if there was no mapping for key.
A null return can also indicate that the Node previously associated null with the specified key, if the implementation supports null values.

previous value associated with specified key, or null if there was no mapping for key.
A null return can also indicate that the Node previously associated null with the specified key, if the implementation supports null values.

startBatch

Starts a batch. This is a lightweight batching mechanism that groups cache writes together and finally performs the
write, persistence and/or replication when Cache.endBatch(boolean) is called rather than for each invocation on the
cache.

Note that if there is an existing transaction in scope and the cache has been configured to use a JTA compliant
transaction manager, calls to Cache.startBatch() and Cache.endBatch(boolean) are ignored and treated as no-ops.

endBatch

Ends an existing ongoing batch. A no-op if a batch has not been started yet.

Note that if there is an existing transaction in scope and the cache has been configured to use a JTA compliant
transaction manager, calls to Cache.startBatch() and Cache.endBatch(boolean) are ignored and treated as no-ops.