public final class EntityFactory extends Object
Copyright (C) 2014 John Wassilak (john@wassilak.com)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
| Modifier and Type | Method and Description |
|---|---|
static <T> Entity<T> |
createEntity(T object,
Long timeToLive)
The createEntity method creates an Entity object with the given parameters.
|
public static <T> Entity<T> createEntity(T object, Long timeToLive) throws EntityException
T - The type of object that the Entity should contain.object - The object represented by this Entity.timeToLive - The time that the Entity can live before it should be removed from the cache, in milliseconds.EntityException - If the entity is being created with invalid parameters.Copyright © 2014. All rights reserved.