com.hazelcast.collection
Class CollectionContainer
java.lang.Object
com.hazelcast.collection.CollectionContainer
- All Implemented Interfaces:
- DataSerializable
- Direct Known Subclasses:
- ListContainer, SetContainer
public abstract class CollectionContainer
- extends Object
- implements DataSerializable
Method Summary |
protected long |
add(Data value)
|
protected Map<Long,Data> |
addAll(List<Data> valueList)
|
protected void |
addAllBackup(Map<Long,Data> valueMap)
|
protected void |
addBackup(long itemId,
Data value)
|
protected Map<Long,Data> |
clear()
|
protected void |
clearBackup(Set<Long> itemIdSet)
|
void |
commitAdd(long itemId,
Data value)
|
void |
commitAddBackup(long itemId,
Data value)
|
CollectionItem |
commitRemove(long itemId)
|
void |
commitRemoveBackup(long itemId)
|
protected Map<Long,Data> |
compareAndRemove(boolean retain,
Set<Data> valueSet)
|
protected boolean |
contains(Set<Data> valueSet)
|
void |
destroy()
|
void |
ensureReserve(long itemId)
|
protected Collection<Data> |
getAll()
|
protected abstract Collection<CollectionItem> |
getCollection()
|
protected abstract CollectionConfig |
getConfig()
|
protected abstract Map<Long,CollectionItem> |
getMap()
|
protected boolean |
hasEnoughCapacity(int delta)
|
void |
init(NodeEngine nodeEngine)
|
long |
nextId()
|
protected abstract void |
onDestroy()
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream |
protected CollectionItem |
remove(Data value)
|
protected void |
removeBackup(long itemId)
|
Long |
reserveAdd(String transactionId,
Data value)
|
void |
reserveAddBackup(long itemId,
String transactionId)
|
CollectionItem |
reserveRemove(long reservedItemId,
Data value,
String transactionId)
|
void |
reserveRemoveBackup(long itemId,
String transactionId)
|
void |
rollbackAdd(long itemId)
|
void |
rollbackAddBackup(long itemId)
|
void |
rollbackRemove(long itemId)
|
void |
rollbackRemoveBackup(long itemId)
|
void |
rollbackTransaction(String transactionId)
|
protected int |
size()
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected String name
nodeEngine
protected NodeEngine nodeEngine
logger
protected ILogger logger
itemMap
protected Map<Long,CollectionItem> itemMap
txMap
protected final Map<Long,TxCollectionItem> txMap
CollectionContainer
protected CollectionContainer()
CollectionContainer
protected CollectionContainer(String name,
NodeEngine nodeEngine)
init
public void init(NodeEngine nodeEngine)
getConfig
protected abstract CollectionConfig getConfig()
getCollection
protected abstract Collection<CollectionItem> getCollection()
getMap
protected abstract Map<Long,CollectionItem> getMap()
add
protected long add(Data value)
addBackup
protected void addBackup(long itemId,
Data value)
remove
protected CollectionItem remove(Data value)
removeBackup
protected void removeBackup(long itemId)
size
protected int size()
clear
protected Map<Long,Data> clear()
clearBackup
protected void clearBackup(Set<Long> itemIdSet)
contains
protected boolean contains(Set<Data> valueSet)
addAll
protected Map<Long,Data> addAll(List<Data> valueList)
addAllBackup
protected void addAllBackup(Map<Long,Data> valueMap)
compareAndRemove
protected Map<Long,Data> compareAndRemove(boolean retain,
Set<Data> valueSet)
getAll
protected Collection<Data> getAll()
hasEnoughCapacity
protected boolean hasEnoughCapacity(int delta)
reserveAdd
public Long reserveAdd(String transactionId,
Data value)
reserveAddBackup
public void reserveAddBackup(long itemId,
String transactionId)
reserveRemove
public CollectionItem reserveRemove(long reservedItemId,
Data value,
String transactionId)
reserveRemoveBackup
public void reserveRemoveBackup(long itemId,
String transactionId)
ensureReserve
public void ensureReserve(long itemId)
rollbackAdd
public void rollbackAdd(long itemId)
rollbackAddBackup
public void rollbackAddBackup(long itemId)
rollbackRemove
public void rollbackRemove(long itemId)
rollbackRemoveBackup
public void rollbackRemoveBackup(long itemId)
commitAdd
public void commitAdd(long itemId,
Data value)
commitAddBackup
public void commitAddBackup(long itemId,
Data value)
commitRemove
public CollectionItem commitRemove(long itemId)
commitRemoveBackup
public void commitRemoveBackup(long itemId)
rollbackTransaction
public void rollbackTransaction(String transactionId)
nextId
public long nextId()
destroy
public void destroy()
onDestroy
protected abstract void onDestroy()
writeData
public void writeData(ObjectDataOutput out)
throws IOException
- Description copied from interface:
DataSerializable
- Writes object fields to output stream
- Specified by:
writeData
in interface DataSerializable
- Parameters:
out
- output
- Throws:
IOException
readData
public void readData(ObjectDataInput in)
throws IOException
- Description copied from interface:
DataSerializable
- Reads fields from the input stream
- Specified by:
readData
in interface DataSerializable
- Parameters:
in
- input
- Throws:
IOException
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.