Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Yuta HIGUCHI
2014-11-05 17:40:28 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1aa249ca74b8c738ba493ecb6c5035590bb7eb05
1aa249ca
1 parent
c7ee0661
separate basic classes from API
Change-Id: I110ebc7da395f60d8c95d8bb09c00bcc2a4f0547
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java
core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java
View file @
1aa249c
...
...
@@ -103,6 +103,20 @@ import com.google.common.collect.ImmutableSet;
public
final
class
KryoNamespaces
{
public
static
final
KryoNamespace
BASIC
=
KryoNamespace
.
newBuilder
()
.
register
(
ImmutableMap
.
class
,
new
ImmutableMapSerializer
())
.
register
(
ImmutableList
.
class
,
new
ImmutableListSerializer
())
.
register
(
ImmutableSet
.
class
,
new
ImmutableSetSerializer
())
.
register
(
ArrayList
.
class
,
Arrays
.
asList
().
getClass
(),
HashMap
.
class
,
HashSet
.
class
,
LinkedList
.
class
,
byte
[].
class
)
.
build
();
/**
* KryoNamespace which can serialize ON.lab misc classes.
*/
...
...
@@ -123,19 +137,8 @@ public final class KryoNamespaces {
*/
public
static
final
KryoNamespace
API
=
KryoNamespace
.
newBuilder
()
.
register
(
MISC
)
.
register
(
ImmutableMap
.
class
,
new
ImmutableMapSerializer
())
.
register
(
ImmutableList
.
class
,
new
ImmutableListSerializer
())
.
register
(
ImmutableSet
.
class
,
new
ImmutableSetSerializer
())
.
register
(
BASIC
)
.
register
(
//
ArrayList
.
class
,
Arrays
.
asList
().
getClass
(),
HashMap
.
class
,
HashSet
.
class
,
LinkedList
.
class
,
byte
[].
class
,
//
//
ControllerNode
.
State
.
class
,
Device
.
Type
.
class
,
Port
.
Type
.
class
,
...
...
Please
register
or
login
to post a comment