Minor DB updates

A node can support multiple streams. Unfortunately, an address can't so there might be multiple entries of the same address for different streams.
Also, store object types. I think we'll need them later, specially in search for public keys we requested.
This commit is contained in:
2015-04-18 14:31:17 +02:00
parent e611e5e20a
commit ceae11b5c6
5 changed files with 54 additions and 13 deletions

View File

@ -68,6 +68,10 @@ public class ObjectMessage implements MessagePayload {
return expiresTime;
}
public long getType() {
return objectType;
}
public ObjectPayload getPayload() {
return payload;
}

View File

@ -0,0 +1,29 @@
/*
* Copyright 2015 Christian Basler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.dissem.bitmessage.utils;
/**
* Created by chris on 18.04.15.
*/
public class UnixTime {
/**
* Returns the time in second based Unix time ({@link System#currentTimeMillis()}/1000)
*/
public static long now() {
return System.currentTimeMillis() / 1000;
}
}