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

pack-priv Class CopyingBruteForceSource

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

A BruteForceSource that wraps another one and deals with copy for read of Elements.
Author
ljacomet

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
CopyingBruteForceSource.CopyingIterable

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
CopyingBruteForceSource(BruteForceSource
the delegate BruteForceSource
delegate
,
CopyStrategyHandler
the copy strategy handler
copyStrategyHandler
)

Construct this CopyingBruteForceSource with the given delegate and the CopyStrategyHandler to use.

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

CopyingBruteForceSourceback to summary
pack-priv CopyingBruteForceSource(BruteForceSource delegate, CopyStrategyHandler copyStrategyHandler)

Construct this CopyingBruteForceSource with the given delegate and the CopyStrategyHandler to use.

Parameters
delegate:BruteForceSource

the delegate BruteForceSource

copyStrategyHandler:CopyStrategyHandler

the copy strategy handler

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 CopyingBruteForceSource.CopyingIterable

extends Object
implements Iterable<Element>
Class Inheritance
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
CopyingBruteForceSource.CopyingIterable.CopyingIterator

Wrapping Iterator responsible of 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
CopyingIterable(Iterable<Element> elements, CopyStrategyHandler copyStrategyHandler)

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

CopyingIterableback to summary
public CopyingIterable(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 CopyingBruteForceSource.CopyingIterable.CopyingIterator

extends Object
implements Iterator<Element>
Class Inheritance
  • java.lang.Object
  • net.sf.ehcache.store.CopyingBruteForceSource.CopyingIterable.CopyingIterator
All Implemented Interfaces
java.util.Iterator

Wrapping Iterator responsible of doing the copy on read

Field Summary

Modifier and TypeField and Description
private final Iterator<Element>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
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

Constructor Detail

CopyingIteratorback to summary
public CopyingIterator(Iterator<Element> delegate)

Method Detail

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