public abstract class CollectionContainer extends Object implements IdentifiedDataSerializable
Modifier and Type | Field and Description |
---|---|
protected Map<Long,CollectionItem> |
itemMap |
protected ILogger |
logger |
protected String |
name |
protected NodeEngine |
nodeEngine |
protected Map<Long,TxCollectionItem> |
txMap |
Modifier | Constructor and Description |
---|---|
protected |
CollectionContainer() |
protected |
CollectionContainer(String name,
NodeEngine nodeEngine) |
Modifier and Type | Method and Description |
---|---|
long |
add(Data value) |
Map<Long,Data> |
addAll(List<Data> valueList) |
void |
addAllBackup(Map<Long,Data> valueMap) |
void |
addBackup(long itemId,
Data value) |
Map<Long,Data> |
clear() |
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) |
Map<Long,Data> |
compareAndRemove(boolean retain,
Set<Data> valueSet) |
boolean |
contains(Set<Data> valueSet) |
void |
destroy() |
void |
ensureReserve(long itemId) |
List<Data> |
getAll() |
protected abstract Collection<CollectionItem> |
getCollection() |
abstract CollectionConfig |
getConfig() |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
protected abstract Map<Long,CollectionItem> |
getMap() |
boolean |
hasEnoughCapacity(int delta) |
void |
init(NodeEngine nodeEngine) |
long |
nextId() |
protected abstract void |
onDestroy() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
CollectionItem |
remove(Data value) |
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) |
int |
size() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
protected final Map<Long,TxCollectionItem> txMap
protected String name
protected NodeEngine nodeEngine
protected ILogger logger
protected Map<Long,CollectionItem> itemMap
protected CollectionContainer()
protected CollectionContainer(String name, NodeEngine nodeEngine)
public void init(NodeEngine nodeEngine)
public abstract CollectionConfig getConfig()
protected abstract Collection<CollectionItem> getCollection()
protected abstract Map<Long,CollectionItem> getMap()
public long add(Data value)
public void addBackup(long itemId, Data value)
public CollectionItem remove(Data value)
public void removeBackup(long itemId)
public int size()
public boolean hasEnoughCapacity(int delta)
public void reserveAddBackup(long itemId, String transactionId)
public CollectionItem reserveRemove(long reservedItemId, Data value, String transactionId)
public void reserveRemoveBackup(long itemId, String transactionId)
public void ensureReserve(long itemId)
public void rollbackAdd(long itemId)
public void rollbackAddBackup(long itemId)
public void rollbackRemove(long itemId)
public void rollbackRemoveBackup(long itemId)
public void commitAdd(long itemId, Data value)
public void commitAddBackup(long itemId, Data value)
public CollectionItem commitRemove(long itemId)
public void commitRemoveBackup(long itemId)
public void rollbackTransaction(String transactionId)
public long nextId()
public void destroy()
protected abstract void onDestroy()
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.