public final class TagHolder extends Object implements Externalizable
Taggable
should
encapsulate an instance of TagHolder
. There should be one instance of this class per taggable
object.Constructor and Description |
---|
TagHolder()
Constructs an instance of
TagHolder . |
Modifier and Type | Method and Description |
---|---|
void |
addTags(String... tags)
Adds the tags specified in the
tags to the current tag list. |
void |
clearTags()
Clears all tags from the holder.
|
com.scaleoutsoftware.soss.client.query.SparseBitmap |
getTags() |
boolean |
hasAllTags(String... tags)
Determines whether this holder has all of the tags specified by
tags . |
boolean |
hasAnyTags(String... tags)
Determines whether this holder has any of the tags specified by
tags . |
void |
readExternal(ObjectInput in) |
void |
removeTags(String... tags)
Removes the tags specified in the
tags from the current tag list. |
void |
writeExternal(ObjectOutput out) |
public void addTags(String... tags) throws NamedCacheException
tags
to the current tag list.tags
- tags to addNamedCacheException
- if unexpected exception occurspublic void removeTags(String... tags) throws NamedCacheException
tags
from the current tag list.tags
- tags to removeNamedCacheException
- if unexpected exception occurspublic boolean hasAllTags(String... tags) throws NamedCacheException
tags
.tags
- tag listtrue
if all tags are present, false
otherwiseNamedCacheException
- if unexpected exception occurspublic boolean hasAnyTags(String... tags) throws NamedCacheException
tags
.tags
- tag listtrue
if any tags are present, false
otherwiseNamedCacheException
- if unexpected exception occurspublic void clearTags()
public com.scaleoutsoftware.soss.client.query.SparseBitmap getTags()
SparseBitmap
containing tag information.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright (C) 2007-2014 ScaleOut Software, Inc.