Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.io.journal
Class JournalBinaryStore.ClearListener

java.lang.Object
  extended by com.tangosol.io.journal.JournalBinaryStore.ClearListener

All Implemented Interfaces:
MultiBinaryLongMap.BinaryLongMapListener, java.util.EventListener
Enclosing class:
JournalBinaryStore

protected static class JournalBinaryStore.ClearListener
extends java.lang.Object
implements MultiBinaryLongMap.BinaryLongMapListener

The ClearListener is used to ensure that entries are removed from the journal when the corresponding keys are cleared from the ticket tree.

Note: this listener directly holds references to the state members of the containing JournalBinaryStore as it could be run during the context of a JournalBinaryStore.dispose() call.


Field Summary
protected  java.util.concurrent.atomic.AtomicLong f_atomicSize
          The atomic holding the size counter.
protected  Journal f_journal
          The Journal.
protected  BinaryLongMap f_tree
          The BinaryLongMap mapping keys to journal tickets.

 

Constructor Summary
JournalBinaryStore.ClearListener(BinaryLongMap blm, Journal journal, java.util.concurrent.atomic.AtomicLong atomicSize)
          Construct a ClearListener for the specified BinaryLongMap and journal.

 

Method Summary
 void keyAdded(Binary binKey)
          A notification that the primary map has added a new Binary/long key/value mapping; this implicitly creates a new key/value mapping in each delegating map, with the value being 0L.
 void keyRemoving(Binary binKey)
          A notification that the primary map is removing a Binary/long key/value mapping; this implies that the existing key/value mapping for the same Binary key in each delegating map is also being removed.
 void mapCleared()
          A notification that the primary map has been cleared; this implies that all of the existing key/value mappings in each delegating map have also been removed.
 void mapClearing()
          A notification that the primary map is about to be cleared; this implies that all of the existing key/value mappings in each delegating map are about to be removed, but that no per-mapping events will be generated in response to those removals.

 

Field Detail

f_tree

protected final BinaryLongMap f_tree
The BinaryLongMap mapping keys to journal tickets.

f_journal

protected final Journal f_journal
The Journal.

f_atomicSize

protected final java.util.concurrent.atomic.AtomicLong f_atomicSize
The atomic holding the size counter.

Constructor Detail

JournalBinaryStore.ClearListener

public JournalBinaryStore.ClearListener(BinaryLongMap blm,
                                        Journal journal,
                                        java.util.concurrent.atomic.AtomicLong atomicSize)
Construct a ClearListener for the specified BinaryLongMap and journal.
Parameters:
blm - the binary long map holding journal tickets
journal - the journal
atomicSize - the atomic size counter to update

Method Detail

keyAdded

public void keyAdded(Binary binKey)
A notification that the primary map has added a new Binary/long key/value mapping; this implicitly creates a new key/value mapping in each delegating map, with the value being 0L.
Specified by:
keyAdded in interface MultiBinaryLongMap.BinaryLongMapListener
Parameters:
binKey - the key that was added

keyRemoving

public void keyRemoving(Binary binKey)
A notification that the primary map is removing a Binary/long key/value mapping; this implies that the existing key/value mapping for the same Binary key in each delegating map is also being removed.
Specified by:
keyRemoving in interface MultiBinaryLongMap.BinaryLongMapListener
Parameters:
binKey - the key that is being removed

mapClearing

public void mapClearing()
A notification that the primary map is about to be cleared; this implies that all of the existing key/value mappings in each delegating map are about to be removed, but that no per-mapping events will be generated in response to those removals.
Specified by:
mapClearing in interface MultiBinaryLongMap.BinaryLongMapListener

mapCleared

public void mapCleared()
A notification that the primary map has been cleared; this implies that all of the existing key/value mappings in each delegating map have also been removed.
Specified by:
mapCleared in interface MultiBinaryLongMap.BinaryLongMapListener

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.