public class MessageIdListImpl extends Object implements MessageIdList, Encodable, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
MessageIdListImpl.MessageIdListImplEncodableFactory |
Modifier and Type | Field and Description |
---|---|
private ArrayList<String> |
list |
private String |
listId |
private static long |
serialVersionUID
define serialVersionUID for interoperability, fix with 5.15.0 value
|
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
Constructor and Description |
---|
MessageIdListImpl() |
MessageIdListImpl(String listId) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
String msgId,
boolean persistent)
The indicator 'persistent' is ignored because the
list is stored as a whole.
|
void |
add(String msgId,
boolean persistent)
The indicator 'persistent' is ignored because the
list is stored as a whole.
|
void |
clear() |
boolean |
contains(String msgId) |
void |
decode(Decoder decoder)
Decodes the content of this object
|
void |
delete()
Deletes the list from the persistent storage.
|
void |
encode(Encoder encoder)
Encodes the content of this object
|
String |
get(int index) |
int |
getEncodableClassId()
Returns a unique class identifier.
|
int |
getEncodedSize()
Returns the size of the byte array that results from the encoding of this object.
|
boolean |
isEmpty() |
Iterator<String> |
iterator() |
String |
remove(int index) |
void |
remove(String msgId) |
void |
save()
Saves the list in the persistent storage.
|
(package private) void |
setListId(String listId) |
int |
size() |
String[] |
toArray(String[] array) |
String |
toString() |
private static final long serialVersionUID
private String listId
public MessageIdListImpl()
public MessageIdListImpl(String listId)
void setListId(String listId)
public int size()
size
in interface MessageIdList
public String[] toArray(String[] array)
toArray
in interface MessageIdList
public boolean contains(String msgId)
contains
in interface MessageIdList
public void add(String msgId, boolean persistent)
add
in interface MessageIdList
msgId
- the added message identifierpersistent
- indicates whether the identifier should be persistently added or
notpublic boolean isEmpty()
isEmpty
in interface MessageIdList
public String remove(int index)
remove
in interface MessageIdList
public String get(int index)
get
in interface MessageIdList
public void remove(String msgId)
remove
in interface MessageIdList
public void add(int index, String msgId, boolean persistent)
add
in interface MessageIdList
index
- the index of the added message identifiermsgId
- the added message identifierpersistent
- indicates whether the identifier should be persistently added or
notpublic Iterator<String> iterator()
iterator
in interface MessageIdList
public void clear()
clear
in interface MessageIdList
public void save() throws Exception
MessageIdList
save
in interface MessageIdList
Exception
public void delete()
MessageIdList
delete
in interface MessageIdList
public int getEncodableClassId()
Encodable
getEncodableClassId
in interface Encodable
public int getEncodedSize() throws Exception
Encodable
getEncodedSize
in interface Encodable
Exception
- if an error occurspublic void encode(Encoder encoder) throws Exception
Encodable
public void decode(Decoder decoder) throws Exception
Encodable
Copyright © 2022 ScalAgent D.T.. All rights reserved.