Top Description Inners Fields Constructors Methods
net.sf.ehcache.store

pack-priv Class TransactionalBruteForceSource

extends Object
implements BruteForceSource
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.store.BruteForceSource
Imports
net.sf.ehcache.Element, net.sf.ehcache.config.Searchable, net.sf.ehcache.transaction.SoftLockID, java.util.Iterator

A BruteForceSource that wraps another one and deals with transactional Elements.
Author
ljacomet

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
TransactionalBruteForceSource.TransactionalIterable

Wrapping Iterable holding the delegate Iterable and the CopyStrategyHandler

Field Summary

Modifier and TypeField and Description
private final CopyStrategyHandler
private final BruteForceSource

Constructor Summary

AccessConstructor and Description
pack-priv
TransactionalBruteForceSource(BruteForceSource
the delegate source
delegate
,
CopyStrategyHandler copyStrategyHandler)

A wrapping BruteForceSource that deals with transactional elements

Method Summary

Modifier and TypeMethod and Description
public Iterable<Element>
elements()

Implements net.sf.ehcache.store.BruteForceSource.elements.

An Iterable over the elements from the source.
public Searchable
getSearchable()

Implements net.sf.ehcache.store.BruteForceSource.getSearchable.

Returns the Searchable configuration of the source.
public Element
transformForIndexing(Element
the element to transform
element
)

Implements net.sf.ehcache.store.BruteForceSource.transformForIndexing.

Transform the element so that it can be used for indexing by the BruteForceSearchManager.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

copyStrategyHandlerback to summary
private final CopyStrategyHandler copyStrategyHandler
delegateback to summary
private final BruteForceSource delegate

Constructor Detail

TransactionalBruteForceSourceback to summary
pack-priv TransactionalBruteForceSource(BruteForceSource delegate, CopyStrategyHandler copyStrategyHandler)

A wrapping BruteForceSource that deals with transactional elements

Parameters
delegate:BruteForceSource

the delegate source

copyStrategyHandler:CopyStrategyHandler

the CopyStrategyHandler to use

Method Detail

elementsback to summary
public Iterable<Element> elements()

Implements net.sf.ehcache.store.BruteForceSource.elements.

Doc from net.sf.ehcache.store.BruteForceSource.elements.

An Iterable over the elements from the source. The elements returned are in the form expected by the BruteForceSearchManager.

Returns:Iterable<Element>

an Iterable of Element

Annotations
@Override
getSearchableback to summary
public Searchable getSearchable()

Implements net.sf.ehcache.store.BruteForceSource.getSearchable.

Doc from net.sf.ehcache.store.BruteForceSource.getSearchable.

Returns the Searchable configuration of the source.

Returns:Searchable

the Searchable configuration

Annotations
@Override
transformForIndexingback to summary
public Element transformForIndexing(Element element)

Implements net.sf.ehcache.store.BruteForceSource.transformForIndexing.

Doc from net.sf.ehcache.store.BruteForceSource.transformForIndexing.

Transform the element so that it can be used for indexing by the BruteForceSearchManager.

Parameters
element:Element

the element to transform

Returns:Element

the transformed element

Annotations
@Override
net.sf.ehcache.store back to summary

private Class TransactionalBruteForceSource.TransactionalIterable

extends Object
implements Iterable<Element>
Class Inheritance
  • java.lang.Object
  • net.sf.ehcache.store.TransactionalBruteForceSource.TransactionalIterable
All Implemented Interfaces
java.lang.Iterable

Wrapping Iterable holding the delegate Iterable and the CopyStrategyHandler

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
TransactionalBruteForceSource.TransactionalIterable.TransactionalIterator

Wrapping Iterator responsible of handling transactional elements and doing the copy on read

Field Summary

Modifier and TypeField and Description
private final CopyStrategyHandler
private final Iterable<Element>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Iterator<Element>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

copyStrategyHandlerback to summary
private final CopyStrategyHandler copyStrategyHandler
elementsback to summary
private final Iterable<Element> elements

Constructor Detail

TransactionalIterableback to summary
public TransactionalIterable(Iterable<Element> elements, CopyStrategyHandler copyStrategyHandler)

Method Detail

iteratorback to summary
public Iterator<Element> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<Element>

an Iterator.

Annotations
@Override
net.sf.ehcache.store back to summary

private Class TransactionalBruteForceSource.TransactionalIterable.TransactionalIterator

extends Object
implements Iterator<Element>
Class Inheritance
  • java.lang.Object
  • net.sf.ehcache.store.TransactionalBruteForceSource.TransactionalIterable.TransactionalIterator
All Implemented Interfaces
java.util.Iterator

Wrapping Iterator responsible of handling transactional elements and doing the copy on read

Field Summary

Modifier and TypeField and Description
private final Iterator<Element>
private Element

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Element
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
public Element
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final Iterator<Element> delegate
nextback to summary
private Element next

Constructor Detail

TransactionalIteratorback to summary
public TransactionalIterator(Iterator<Element> delegate)

Method Detail

getNextElementback to summary
private Element getNextElement()
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public Element next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Element

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override