@Override public String toString() { return identity.toString(); } }
private Long getStateIndex( Identity identity ) throws IOException { return (Long) index.find( identity.toBytes() ); }
public void setIdentity( Identity identity ) { if( identity == null ) { return; } this.identity = identity.toString(); }
private Long getStateIndex( Identity identity ) throws IOException { return (Long) index.find( identity.toBytes() ); }
public void setIdentity( Identity identity ) { if( identity == null ) { return; } this.identity = identity.toString(); }
@Override public String toString() { return identity.toString(); } }
@Override public String extractName( Identity identity ) { String idString = identity.toString(); int pos = idString.indexOf( SEPARATOR ); if( pos < 1 ) { throw new InvalidIdentityFormatException( idString ); } return idString.substring( pos + 1 ); }
public static Predicate<ServiceReference<?>> withId( final String anId ) { return service -> service.identity().toString().equals( anId ); }
public String getId() { return serviceDescriptor.identity().toString(); }
public String getId() { return serviceDescriptor.identity().toString(); }
public static Predicate<ServiceReference<?>> withId( final String anId ) { return service -> service.identity().toString().equals( anId ); }
public String getId() { return serviceDescriptor.identity().toString(); }
public String getId() { return serviceDescriptor.identity().toString(); }
public AbstractSQLIndexQueryAssembler() { identifiedBy( DEFAULT_IDENTITY.toString() ); }
@Override public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor ) throws EntityNotFoundException { String jsonState = jedis.get( ref.identity().toString() ); if( notFound( jsonState ) ) { throw new EntityNotFoundException( ref ); } jedis.del( ref.identity().toString() ); } } );
private void removeEntity( EntityState state, PreparedStatement ps ) throws SQLException { ps.setString( 1, state.entityReference().identity().toString() ); ps.addBatch(); }
private File createTemporaryDatabase() { try { File tempDatabase = Files.createTempFile( getTemporaryDirectory().toPath(), descriptor.identity().toString(), "write" ).toFile(); tempDatabase.deleteOnExit(); return tempDatabase; } catch( IOException ex ) { throw new UncheckedIOException( ex ); } }
private File createTemporaryDatabase() { try { File tempDatabase = Files.createTempFile( getTemporaryDirectory().toPath(), descriptor.identity().toString(), "write" ).toFile(); tempDatabase.deleteOnExit(); return tempDatabase; } catch( IOException ex ) { throw new UncheckedIOException( ex ); } }
private File getTemporaryDirectory() throws IOException { if( tempDirectory != null ) { return tempDirectory; } String storeId = descriptor.identity().toString(); tempDirectory = fileConfiguration != null ? new File( fileConfiguration.temporaryDirectory(), storeId ) : new File( new File( System.getProperty( "java.io.tmpdir" ) ), storeId ); if( !tempDirectory.exists() ) { java.nio.file.Files.createDirectories( tempDirectory.toPath() ); } return tempDirectory; }
private File getTemporaryDirectory() throws IOException { if( tempDirectory != null ) { return tempDirectory; } String storeId = descriptor.identity().toString(); tempDirectory = fileConfiguration != null ? new File( fileConfiguration.temporaryDirectory(), storeId ) : new File( new File( System.getProperty( "java.io.tmpdir" ) ), storeId ); if( !tempDirectory.exists() ) { java.nio.file.Files.createDirectories( tempDirectory.toPath() ); } return tempDirectory; }